[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1426687464-2563-7-git-send-email-r.baldyga@samsung.com>
Date: Wed, 18 Mar 2015 15:04:11 +0100
From: Robert Baldyga <r.baldyga@...sung.com>
To: balbi@...com
Cc: gregkh@...uxfoundation.org, myungjoo.ham@...sung.com,
cw00.choi@...sung.com, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, m.szyprowski@...sung.com,
Robert Baldyga <r.baldyga@...sung.com>
Subject: [RFC 06/19] dwc3: gadget: check returned value in suspend/resume
Check value returned by dwc3_gadget_run_stop() in suspend/resume
functions and propagate it to next layer.
Signed-off-by: Robert Baldyga <r.baldyga@...sung.com>
---
drivers/usb/dwc3/gadget.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 4e73934..b0c1ab5 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2827,18 +2827,22 @@ void dwc3_gadget_exit(struct dwc3 *dwc)
int dwc3_gadget_suspend(struct dwc3 *dwc)
{
+ int ret = 0;
+
if (dwc->pullups_connected) {
dwc3_gadget_disable_irq(dwc);
- dwc3_gadget_run_stop(dwc, true, true);
+ ret = dwc3_gadget_run_stop(dwc, true, true);
}
dwc->dcfg = dwc3_readl(dwc->regs, DWC3_DCFG);
- return 0;
+ return ret;
}
int dwc3_gadget_resume(struct dwc3 *dwc)
{
+ int ret = 0;
+
/* Start with SuperSpeed Default */
dwc3_gadget_ep0_desc.wMaxPacketSize = cpu_to_le16(512);
@@ -2846,8 +2850,8 @@ int dwc3_gadget_resume(struct dwc3 *dwc)
if (dwc->pullups_connected) {
dwc3_gadget_enable_irq(dwc);
- dwc3_gadget_run_stop(dwc, true, false);
+ ret = dwc3_gadget_run_stop(dwc, true, false);
}
- return 0;
+ return ret;
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists