mirror of https://gitee.com/openkylin/linux.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 <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:
parent
8284f93b3d
commit
5351035258
|
@ -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");
|
||||||
|
|
Loading…
Reference in New Issue