summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/phy.h
diff options
context:
space:
mode:
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>2018-04-18 21:39:46 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-22 15:01:30 +0200
commitdd40438fc6be7454c906093fe2a1b69ca98946fb (patch)
treeba83c043a54009d56fc22a347ddc6ec5ffeeeeff /drivers/usb/core/phy.h
parentb1b59e16075f5e5da2943ce8de724ab96bc3c6c2 (diff)
downloadlinux-dd40438fc6be7454c906093fe2a1b69ca98946fb.tar.gz
linux-dd40438fc6be7454c906093fe2a1b69ca98946fb.tar.bz2
linux-dd40438fc6be7454c906093fe2a1b69ca98946fb.zip
usb: core: phy: fix return value of usb_phy_roothub_exit()
usb_phy_roothub_exit() should return the error code from the phy_exit() call if exiting the PHY failed. However, since a wrong variable is used usb_phy_roothub_exit() currently always returns 0, even if one of the phy_exit calls returned an error. Clang also reports this bug: kernel/drivers/usb/core/phy.c:114:8: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] error, forbidden warning: phy.c:114 Fix this by assigning the error code from phy_exit() to the "ret" variable to propagate the error correctly. Fixes: 07dbff0ddbd86c ("usb: core: add a wrapper for the USB PHYs on the HCD") Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org> Tested-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/phy.h')
0 files changed, 0 insertions, 0 deletions