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: ecd29dabb2 ("usb: dwc2: pci: Handle error cleanup in probe")
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
Dan Carpenter 2018-10-18 10:36:47 +03:00 committed by Felipe Balbi
parent 7b412b04a0
commit 3c135e8900
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}