Skip to contentSkip to conversation

arch/ppc: Remove an unnecessary pci_dev_put.

PATCH New Julia Lawall 1 participant 1 message Nov 3, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch/ppc: Remove an unnecessary pci_dev_put.

From: Julia Lawall <[email protected]>

Remove an unnecessary pci_dev_put. pci_dev_put is called implicitly by the subsequent call to pci_get_device.

The problem was detected using the following semantic patch, and corrected by hand.

@@
expression dev;
expression E;
@@

- pci_dev_put(dev)
... when != dev = E
- pci_get_device(...,dev)

---

arch/ppc/platforms/prep_pci.c +0 -1
diff -up a/arch/ppc/platforms/prep_pci.c b/arch/ppc/platforms/prep_pci.c
@@ -1099,7 +1099,6 @@ prep_pib_init(void)
 				pci_write_config_byte(dev, 0x43, reg);
 			}
 		}
-		pci_dev_put(dev);
 	}
 
 	if ((dev = pci_get_device(PCI_VENDOR_ID_WINBOND,