Commit 8874ae5f authored by Wei Yongjun's avatar Wei Yongjun Committed by Felipe Balbi

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: efed421a ("usb: gadget: Add UDC driver for Broadcom USB3.0 device controller IP BDC")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 755d7395
...@@ -77,6 +77,7 @@ static int bdc_pci_probe(struct pci_dev *pci, const struct pci_device_id *id) ...@@ -77,6 +77,7 @@ static int bdc_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
if (ret) { if (ret) {
dev_err(&pci->dev, dev_err(&pci->dev,
"couldn't add resources to bdc device\n"); "couldn't add resources to bdc device\n");
platform_device_put(bdc);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment