浏览代码

usb: host: xhci-tegra: Fix error return code in tegra_xusb_probe()

Fix to return error code -ENOMEM from the usb_create_shared_hcd()
error handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun 9 年之前
父节点
当前提交
b175b38a0f
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/usb/host/xhci-tegra.c

+ 1 - 0
drivers/usb/host/xhci-tegra.c

@@ -1116,6 +1116,7 @@ static int tegra_xusb_probe(struct platform_device *pdev)
 						 tegra->hcd);
 	if (!xhci->shared_hcd) {
 		dev_err(&pdev->dev, "failed to create shared HCD\n");
+		err = -ENOMEM;
 		goto remove_usb2;
 	}