* [PATCH] arch/ppc: Remove an unnecessary pci_dev_put.
@ 2007-11-03 15:14 Julia Lawall
0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2007-11-03 15:14 UTC (permalink / raw)
To: paulus; +Cc: linux-kernel
From: Julia Lawall <julia@diku.dk>
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)
Signed-off-by: Julia Lawall <julia@diku.dk>
---
diff -up a/arch/ppc/platforms/prep_pci.c b/arch/ppc/platforms/prep_pci.c
--- a/arch/ppc/platforms/prep_pci.c 2007-11-03 15:25:45.000000000 +0100
+++ b/arch/ppc/platforms/prep_pci.c 2007-11-03 15:25:59.000000000 +0100
@@ -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,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-03 15:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-03 15:14 [PATCH] arch/ppc: Remove an unnecessary pci_dev_put Julia Lawall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®