Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d26b587 authored by Paul Zimmerman's avatar Paul Zimmerman Committed by Felipe Balbi
Browse files

usb: dwc3: pci: fix failure path in dwc3_pci_probe()



dwc3_pci_probe() would return success even if the calls to
dwc3_get_device_id() or platform_device_alloc() fail, fix that.

Signed-off-by: default avatarPaul Zimmerman <paulz@synopsys.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 3e87c42a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -81,8 +81,10 @@ static int __devinit dwc3_pci_probe(struct pci_dev *pci,
	pci_set_master(pci);

	devid = dwc3_get_device_id();
	if (devid < 0)
	if (devid < 0) {
		ret = -ENOMEM;
		goto err1;
	}

	dwc3 = platform_device_alloc("dwc3", devid);
	if (!dwc3) {