staging: dwc2: fix error return code in dwc2_hcd_init()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 12 Apr 2013 14:41:48 +0000 (22:41 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Apr 2013 22:09:59 +0000 (15:09 -0700)
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>
drivers/staging/dwc2/hcd.c

index bc9c3c51be7590681be88fb492783ab19ac01c7c..7a144c10b81addc0d7b6d1b3c9dd144caa7957e6 100644 (file)
@@ -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");