summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2018-01-23 09:35:14 +0000
committerFelipe Balbi <felipe.balbi@linux.intel.com>2018-02-15 15:28:13 +0200
commit8874ae5f15f3feef3b4a415b9aed51edcf449aa1 (patch)
tree784289ea8dfd428974b927c59fff2b1900076b65 /drivers
parent755d739534f998d92e348fba8ffb0478416576e7 (diff)
downloadlinux-stable-8874ae5f15f3feef3b4a415b9aed51edcf449aa1.tar.gz
linux-stable-8874ae5f15f3feef3b4a415b9aed51edcf449aa1.tar.bz2
linux-stable-8874ae5f15f3feef3b4a415b9aed51edcf449aa1.zip
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: efed421a94e6 ("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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/udc/bdc/bdc_pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/bdc/bdc_pci.c b/drivers/usb/gadget/udc/bdc/bdc_pci.c
index 1e940f054cb8..6dbc489513cd 100644
--- a/drivers/usb/gadget/udc/bdc/bdc_pci.c
+++ b/drivers/usb/gadget/udc/bdc/bdc_pci.c
@@ -77,6 +77,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;
}