diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-07 04:01:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:54:05 -0500 |
commit | 6044ec8882c726e325017bd948aa0cd94ad33abc (patch) | |
tree | 3bfc5dc93434e8ad556540f6689abcd2699aa45d /drivers/pci/hotplug/cpqphp_pci.c | |
parent | 2ea7533060e361810c21b2f5ee02151c4dfb85d8 (diff) |
[PATCH] kfree cleanup: misc remaining drivers
This is the remaining misc drivers/ part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in misc files in
drivers/.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
Acked-by: Roland Dreier <rolandd@cisco.com>
Acked-by: Pierre Ossman <drzeus@drzeus.cx>
Acked-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Len Brown <len.brown@intel.com>
Acked-by: "Antonino A. Daplas" <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pci/hotplug/cpqphp_pci.c')
-rw-r--r-- | drivers/pci/hotplug/cpqphp_pci.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/pci/hotplug/cpqphp_pci.c b/drivers/pci/hotplug/cpqphp_pci.c index 93e39c4096a9..00b81a7bdd26 100644 --- a/drivers/pci/hotplug/cpqphp_pci.c +++ b/drivers/pci/hotplug/cpqphp_pci.c | |||
@@ -259,8 +259,7 @@ static int PCI_GetBusDevHelper(struct controller *ctrl, u8 *bus_num, u8 *dev_num | |||
259 | sizeof(struct irq_routing_table)) / sizeof(struct irq_info); | 259 | sizeof(struct irq_routing_table)) / sizeof(struct irq_info); |
260 | // Make sure I got at least one entry | 260 | // Make sure I got at least one entry |
261 | if (len == 0) { | 261 | if (len == 0) { |
262 | if (PCIIRQRoutingInfoLength != NULL) | 262 | kfree(PCIIRQRoutingInfoLength ); |
263 | kfree(PCIIRQRoutingInfoLength ); | ||
264 | return -1; | 263 | return -1; |
265 | } | 264 | } |
266 | 265 | ||
@@ -275,8 +274,7 @@ static int PCI_GetBusDevHelper(struct controller *ctrl, u8 *bus_num, u8 *dev_num | |||
275 | ctrl->pci_bus->number = tbus; | 274 | ctrl->pci_bus->number = tbus; |
276 | pci_bus_read_config_dword (ctrl->pci_bus, *dev_num, PCI_VENDOR_ID, &work); | 275 | pci_bus_read_config_dword (ctrl->pci_bus, *dev_num, PCI_VENDOR_ID, &work); |
277 | if (!nobridge || (work == 0xffffffff)) { | 276 | if (!nobridge || (work == 0xffffffff)) { |
278 | if (PCIIRQRoutingInfoLength != NULL) | 277 | kfree(PCIIRQRoutingInfoLength ); |
279 | kfree(PCIIRQRoutingInfoLength ); | ||
280 | return 0; | 278 | return 0; |
281 | } | 279 | } |
282 | 280 | ||
@@ -289,20 +287,17 @@ static int PCI_GetBusDevHelper(struct controller *ctrl, u8 *bus_num, u8 *dev_num | |||
289 | dbg("Scan bus for Non Bridge: bus %d\n", tbus); | 287 | dbg("Scan bus for Non Bridge: bus %d\n", tbus); |
290 | if (PCI_ScanBusForNonBridge(ctrl, tbus, dev_num) == 0) { | 288 | if (PCI_ScanBusForNonBridge(ctrl, tbus, dev_num) == 0) { |
291 | *bus_num = tbus; | 289 | *bus_num = tbus; |
292 | if (PCIIRQRoutingInfoLength != NULL) | 290 | kfree(PCIIRQRoutingInfoLength ); |
293 | kfree(PCIIRQRoutingInfoLength ); | ||
294 | return 0; | 291 | return 0; |
295 | } | 292 | } |
296 | } else { | 293 | } else { |
297 | if (PCIIRQRoutingInfoLength != NULL) | 294 | kfree(PCIIRQRoutingInfoLength ); |
298 | kfree(PCIIRQRoutingInfoLength ); | ||
299 | return 0; | 295 | return 0; |
300 | } | 296 | } |
301 | 297 | ||
302 | } | 298 | } |
303 | } | 299 | } |
304 | if (PCIIRQRoutingInfoLength != NULL) | 300 | kfree(PCIIRQRoutingInfoLength ); |
305 | kfree(PCIIRQRoutingInfoLength ); | ||
306 | return -1; | 301 | return -1; |
307 | } | 302 | } |
308 | 303 | ||