Skip to content

Commit

Permalink
[POWERPC] arch/ppc: Remove an unnecessary pci_dev_put
Browse files Browse the repository at this point in the history
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>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Julia Lawall authored and Paul Mackerras committed Dec 20, 2007
1 parent ca55f05 commit bd4c2ed
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/ppc/platforms/prep_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit bd4c2ed

Please sign in to comment.