diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2018-01-23 12:35:14 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-02-15 16:28:13 +0300 |
commit | 8874ae5f15f3feef3b4a415b9aed51edcf449aa1 (patch) | |
tree | 784289ea8dfd428974b927c59fff2b1900076b65 /drivers/usb/gadget/udc/bdc | |
parent | 755d739534f998d92e348fba8ffb0478416576e7 (diff) | |
download | linux-8874ae5f15f3feef3b4a415b9aed51edcf449aa1.tar.xz |
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/usb/gadget/udc/bdc')
-rw-r--r-- | drivers/usb/gadget/udc/bdc/bdc_pci.c | 1 |
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; } |