提交 33551997 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

usb: dwc2: pci: Fix an error code in probe

[ Upstream commit 3c135e89 ]

We added some error handling to this function but forgot to set the
error code on this path.

Fixes: ecd29dab ("usb: dwc2: pci: Handle error cleanup in probe")
Acked-by: NMinas Harutyunyan <hminas@synopsys.com>
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 4f22a32f
......@@ -120,6 +120,7 @@ static int dwc2_pci_probe(struct pci_dev *pci,
dwc2 = platform_device_alloc("dwc2", PLATFORM_DEVID_AUTO);
if (!dwc2) {
dev_err(dev, "couldn't allocate dwc2 device\n");
ret = -ENOMEM;
goto err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册