diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-08-21 10:41:22 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-08-27 22:05:30 +0200 |
commit | 0f82768406914d1391ec6d087500db7405f8f68e (patch) | |
tree | 09e1bde0078d2e742118f666f5d849bd91df82a1 /drivers/usb | |
parent | usb: gadget: gadgetfs: potential use after free in unbind() (diff) | |
download | linux-0f82768406914d1391ec6d087500db7405f8f68e.tar.xz linux-0f82768406914d1391ec6d087500db7405f8f68e.zip |
usb: phy: signedness bugs in suspend/resume functions
"ret" needs to be signed for the error handling to work.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/phy/phy-omap-usb2.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/phy/phy-omap-usb2.c b/drivers/usb/phy/phy-omap-usb2.c index 844ab68f08d0..d266861d24f7 100644 --- a/drivers/usb/phy/phy-omap-usb2.c +++ b/drivers/usb/phy/phy-omap-usb2.c @@ -98,8 +98,8 @@ static int omap_usb_set_peripheral(struct usb_otg *otg, static int omap_usb2_suspend(struct usb_phy *x, int suspend) { - u32 ret; struct omap_usb *phy = phy_to_omapusb(x); + int ret; if (suspend && !phy->is_suspended) { omap_control_usb_phy_power(phy->control_dev, 0); @@ -108,8 +108,7 @@ static int omap_usb2_suspend(struct usb_phy *x, int suspend) } else if (!suspend && phy->is_suspended) { ret = pm_runtime_get_sync(phy->dev); if (ret < 0) { - dev_err(phy->dev, "get_sync failed with err %d\n", - ret); + dev_err(phy->dev, "get_sync failed with err %d\n", ret); return ret; } omap_control_usb_phy_power(phy->control_dev, 1); @@ -209,9 +208,9 @@ static int omap_usb2_runtime_suspend(struct device *dev) static int omap_usb2_runtime_resume(struct device *dev) { - u32 ret = 0; struct platform_device *pdev = to_platform_device(dev); struct omap_usb *phy = platform_get_drvdata(pdev); + int ret; ret = clk_enable(phy->wkupclk); if (ret < 0) { |