Re: 2.6.13-rc6-mm1 [i6300escb.c 2 bugs, little cleanup]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In i6300esb.c watchdog card driver were 2 bugs (misused pc_match_device
and pci_dev_put wasn't called in one error case) and one little cleanup
was done (long line was converted to a shorter one with using built-in
macro).

Generated in 2.6.13-rc6-mm1 kernel version.

Signed-off-by: Jiri Slaby <[email protected]>

i6300esb.c |    9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/char/watchdog/i6300esb.c b/drivers/char/watchdog/i6300esb.c
--- a/drivers/char/watchdog/i6300esb.c
+++ b/drivers/char/watchdog/i6300esb.c
@@ -349,7 +349,7 @@ static struct notifier_block esb_notifie
  * want to register another driver on the same PCI id.
  */
 static struct pci_device_id esb_pci_tbl[] = {
-        { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_9, PCI_ANY_ID, PCI_ANY_ID, },
+        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_9), },
         { 0, },                 /* End of list */
 };
 MODULE_DEVICE_TABLE (pci, esb_pci_tbl);
@@ -369,7 +369,7 @@ static unsigned char __init esb_getdevic
          */
 
         for_each_pci_dev(dev)
-                if (pci_match_device(esb_pci_tbl, dev)) {
+                if (pci_match_id(esb_pci_tbl, dev)) {
                         esb_pci = dev;
                         break;
                 }
@@ -377,7 +377,7 @@ static unsigned char __init esb_getdevic
         if (esb_pci) {
         	if (pci_enable_device(esb_pci)) {
 			printk (KERN_ERR PFX "failed to enable device\n");
-			goto out;
+			goto err_devput;
 		}
 
 		if (pci_request_region(esb_pci, 0, ESB_MODULE_NAME)) {
@@ -429,9 +429,10 @@ err_release:
 		pci_release_region(esb_pci, 0);
 err_disable:
 		pci_disable_device(esb_pci);
+err_devput:
 		pci_dev_put(esb_pci);
 	}
-out:
+
 	return 0;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux