From: Dan Carpenter Date: Thu, 18 Oct 2018 07:36:47 +0000 (+0300) Subject: usb: dwc2: pci: Fix an error code in probe X-Git-Tag: rel_imx_4.19.35_1.1.0~8033 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=3355199746b89d6e92d83e788b36ce1fe4a98813;p=linux.git usb: dwc2: pci: Fix an error code in probe [ Upstream commit 3c135e8900199e3b9375c1eff808cceba2ee37de ] 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 Signed-off-by: Dan Carpenter Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin --- 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; }