aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/pci-quirks.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/pci-quirks.c')
-rw-r--r--drivers/usb/host/pci-quirks.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index 2f3acebb577a..dd483c13565b 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -233,10 +233,8 @@ commit:
233 233
234 spin_unlock_irqrestore(&amd_lock, flags); 234 spin_unlock_irqrestore(&amd_lock, flags);
235 235
236 if (info.nb_dev) 236 pci_dev_put(info.nb_dev);
237 pci_dev_put(info.nb_dev); 237 pci_dev_put(info.smbus_dev);
238 if (info.smbus_dev)
239 pci_dev_put(info.smbus_dev);
240 238
241 } else { 239 } else {
242 /* no race - commit the result */ 240 /* no race - commit the result */
@@ -447,10 +445,8 @@ void usb_amd_dev_put(void)
447 445
448 spin_unlock_irqrestore(&amd_lock, flags); 446 spin_unlock_irqrestore(&amd_lock, flags);
449 447
450 if (nb) 448 pci_dev_put(nb);
451 pci_dev_put(nb); 449 pci_dev_put(smbus);
452 if (smbus)
453 pci_dev_put(smbus);
454} 450}
455EXPORT_SYMBOL_GPL(usb_amd_dev_put); 451EXPORT_SYMBOL_GPL(usb_amd_dev_put);
456 452