Skip to content

Commit 8874ae5

Browse files
Wei YongjunFelipe Balbi
authored andcommitted
USB: gadget: udc: Add missing platform_device_put() on error in bdc_pci_probe()
Add the missing platform_device_put() before return from bdc_pci_probe() in the platform_device_add_resources() error handling case. Fixes: efed421 ("usb: gadget: Add UDC driver for Broadcom USB3.0 device controller IP BDC") Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent 755d739 commit 8874ae5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/usb/gadget/udc/bdc/bdc_pci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ static int bdc_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
7777
if (ret) {
7878
dev_err(&pci->dev,
7979
"couldn't add resources to bdc device\n");
80+
platform_device_put(bdc);
8081
return ret;
8182
}
8283

0 commit comments

Comments
 (0)