summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc2/pci.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-10-18 10:36:47 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2018-11-14 12:07:12 +0300
commit3c135e8900199e3b9375c1eff808cceba2ee37de (patch)
tree2c45bd8bb97f6e2f7b5ed1fb791d8762db0f0903 /drivers/usb/dwc2/pci.c
parent7b412b04a0c7000293008231ce8413056abb1982 (diff)
downloadlinux-3c135e8900199e3b9375c1eff808cceba2ee37de.tar.xz
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: ecd29dabb2ba ("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>
Diffstat (limited to 'drivers/usb/dwc2/pci.c')
-rw-r--r--drivers/usb/dwc2/pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/pci.c b/drivers/usb/dwc2/pci.c
index d257c541e51b..7afc10872f1f 100644
--- a/drivers/usb/dwc2/pci.c
+++ b/drivers/usb/dwc2/pci.c
@@ -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;
}