Commit 0f827684 authored by Dan Carpenter's avatar Dan Carpenter Committed by Felipe Balbi

usb: phy: signedness bugs in suspend/resume functions

"ret" needs to be signed for the error handling to work.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent df498995
...@@ -98,8 +98,8 @@ static int omap_usb_set_peripheral(struct usb_otg *otg, ...@@ -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) static int omap_usb2_suspend(struct usb_phy *x, int suspend)
{ {
u32 ret;
struct omap_usb *phy = phy_to_omapusb(x); struct omap_usb *phy = phy_to_omapusb(x);
int ret;
if (suspend && !phy->is_suspended) { if (suspend && !phy->is_suspended) {
omap_control_usb_phy_power(phy->control_dev, 0); omap_control_usb_phy_power(phy->control_dev, 0);
...@@ -108,8 +108,7 @@ static int omap_usb2_suspend(struct usb_phy *x, int suspend) ...@@ -108,8 +108,7 @@ static int omap_usb2_suspend(struct usb_phy *x, int suspend)
} else if (!suspend && phy->is_suspended) { } else if (!suspend && phy->is_suspended) {
ret = pm_runtime_get_sync(phy->dev); ret = pm_runtime_get_sync(phy->dev);
if (ret < 0) { if (ret < 0) {
dev_err(phy->dev, "get_sync failed with err %d\n", dev_err(phy->dev, "get_sync failed with err %d\n", ret);
ret);
return ret; return ret;
} }
omap_control_usb_phy_power(phy->control_dev, 1); omap_control_usb_phy_power(phy->control_dev, 1);
...@@ -209,9 +208,9 @@ static int omap_usb2_runtime_suspend(struct device *dev) ...@@ -209,9 +208,9 @@ static int omap_usb2_runtime_suspend(struct device *dev)
static int omap_usb2_runtime_resume(struct device *dev) static int omap_usb2_runtime_resume(struct device *dev)
{ {
u32 ret = 0;
struct platform_device *pdev = to_platform_device(dev); struct platform_device *pdev = to_platform_device(dev);
struct omap_usb *phy = platform_get_drvdata(pdev); struct omap_usb *phy = platform_get_drvdata(pdev);
int ret;
ret = clk_enable(phy->wkupclk); ret = clk_enable(phy->wkupclk);
if (ret < 0) { if (ret < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment