Browse Source

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 <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun 12 years ago
parent
commit
5351035258
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/staging/dwc2/hcd.c

+ 1 - 0
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");