usb: dwc3: pci: fix another failure path in dwc3_pci_probe()
authorFelipe Balbi <balbi@ti.com>
Mon, 12 Mar 2012 14:41:19 +0000 (16:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Mar 2012 21:24:08 +0000 (14:24 -0700)
When applying commit 7d26b58 (fix failure path in
dwc3_pci_probe()), I mistakenly left out one of the
possible failures where we would return success even
on the error case.

This patch fixes that mistake.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/dwc3-pci.c

index dcc64791b4e15ff1cd75035de5f784f34b29202b..20d0c8adfe407198461dc34835a3f951aabb775b 100644 (file)
@@ -89,6 +89,7 @@ static int __devinit dwc3_pci_probe(struct pci_dev *pci,
        dwc3 = platform_device_alloc("dwc3", devid);
        if (!dwc3) {
                dev_err(dev, "couldn't allocate dwc3 device\n");
+               ret = -ENOMEM;
                goto err1;
        }