mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
USB: gadget: udc: Add missing platform_device_put() on error in bdc_pci_probe()
commit8874ae5f15upstream. Add the missing platform_device_put() before return from bdc_pci_probe() in the platform_device_add_resources() error handling case. Fixes:efed421a94("usb: gadget: Add UDC driver for Broadcom USB3.0 device controller IP BDC") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e1994e4d56
commit
a52a0a6c90
@@ -82,6 +82,7 @@ static int bdc_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
|
||||
if (ret) {
|
||||
dev_err(&pci->dev,
|
||||
"couldn't add resources to bdc device\n");
|
||||
platform_device_put(bdc);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user