Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: rockchip-inno-usb2: remove redundant assignment to variable delay

Variable delay is being assigned to zero and the code falls through to
the next case in a switch statement that returns out of the function.
The variable is never read in this scenario and so the assignment is
redundant and can be removed.

Cleans up scan-build static analysis warning:
drivers/phy/rockchip/phy-rockchip-inno-usb2.c:753:3: warning: Value
stored to 'delay' is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20211211180054.525368-1-colin.i.king@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Colin Ian King and committed by
Vinod Koul
b156117a 9d031a51

-1
-1
drivers/phy/rockchip/phy-rockchip-inno-usb2.c
··· 750 750 fallthrough; 751 751 case USB_CHG_STATE_SECONDARY_DONE: 752 752 rphy->chg_state = USB_CHG_STATE_DETECTED; 753 - delay = 0; 754 753 fallthrough; 755 754 case USB_CHG_STATE_DETECTED: 756 755 /* put the controller in normal mode */