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>
This commit is contained in:
Wei Yongjun 2013-04-12 22:41:48 +08:00 committed by Greg Kroah-Hartman
parent 8284f93b3d
commit 5351035258
1 changed files with 1 additions and 0 deletions

View File

@ -2836,6 +2836,7 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq,
goto error2; goto error2;
/* Create new workqueue and init work */ /* Create new workqueue and init work */
retval = -ENOMEM;
hsotg->wq_otg = create_singlethread_workqueue("dwc2"); hsotg->wq_otg = create_singlethread_workqueue("dwc2");
if (!hsotg->wq_otg) { if (!hsotg->wq_otg) {
dev_err(hsotg->dev, "Failed to create workqueue\n"); dev_err(hsotg->dev, "Failed to create workqueue\n");