Commit 3c135e89 authored by Dan Carpenter's avatar Dan Carpenter Committed by Felipe Balbi

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

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: default avatarMinas Harutyunyan <hminas@synopsys.com>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 7b412b04
......@@ -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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment