[PATCH 6/10] drivers/char: pci_find_device remove (drivers/char/stallion.c)

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

 



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

 stallion.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -2726,7 +2726,7 @@ static inline int stl_findpcibrds(void)
 #endif
 
 	for (i = 0; (i < stl_nrpcibrds); i++)
-		while ((dev = pci_find_device(stl_pcibrds[i].vendid,
+		while ((dev = pci_get_device(stl_pcibrds[i].vendid,
 		    stl_pcibrds[i].devid, dev))) {
 
 /*
@@ -2737,8 +2737,10 @@ static inline int stl_findpcibrds(void)
 				continue;
 
 			rc = stl_initpcibrd(stl_pcibrds[i].brdtype, dev);
-			if (rc)
+			if (rc) {
+				pci_dev_put(dev);
 				return(rc);
+			}
 		}
 
 	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