From: Wei Yongjun Date: Fri, 12 Apr 2013 14:41:48 +0000 (+0800) Subject: staging: dwc2: fix error return code in dwc2_hcd_init() X-Git-Tag: firefly_0821_release~3680^2~674^2~75 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=53510352587c5350a8ae0c150a73244ce176ae40;p=firefly-linux-kernel-4.4.55.git staging: dwc2: fix error return code in dwc2_hcd_init() Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun Reviewed-by: Matthijs Kooijman Acked-by: Paul Zimmerman Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/dwc2/hcd.c b/drivers/staging/dwc2/hcd.c index bc9c3c51be75..7a144c10b81a 100644 --- a/drivers/staging/dwc2/hcd.c +++ b/drivers/staging/dwc2/hcd.c @@ -2836,6 +2836,7 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq, goto error2; /* Create new workqueue and init work */ + retval = -ENOMEM; hsotg->wq_otg = create_singlethread_workqueue("dwc2"); if (!hsotg->wq_otg) { dev_err(hsotg->dev, "Failed to create workqueue\n");