diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-06-01 05:41:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-19 17:13:24 -0400 |
commit | 9df7fde52c33075b9f9148ee31215c03824fcc38 (patch) | |
tree | debb5999dd3689639310d52632d26864ce208c24 /drivers/pci/hotplug | |
parent | 99ff124d1673a1e3f19061ebc82634608d1119ed (diff) |
[PATCH] PCI Hotplug: fake NULL pointer dereferences in IBM Hot Plug Controller Driver
Remove checks for value, since the hotplug core always provides
a valid value.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r-- | drivers/pci/hotplug/ibmphp_core.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c index e13d5b87241a..59392946c2bd 100644 --- a/drivers/pci/hotplug/ibmphp_core.c +++ b/drivers/pci/hotplug/ibmphp_core.c | |||
@@ -285,7 +285,7 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 * value) | |||
285 | (ulong) hotplug_slot, (ulong) value); | 285 | (ulong) hotplug_slot, (ulong) value); |
286 | 286 | ||
287 | ibmphp_lock_operations(); | 287 | ibmphp_lock_operations(); |
288 | if (hotplug_slot && value) { | 288 | if (hotplug_slot) { |
289 | pslot = hotplug_slot->private; | 289 | pslot = hotplug_slot->private; |
290 | if (pslot) { | 290 | if (pslot) { |
291 | memcpy(&myslot, pslot, sizeof(struct slot)); | 291 | memcpy(&myslot, pslot, sizeof(struct slot)); |
@@ -315,7 +315,7 @@ static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 * value) | |||
315 | debug("get_latch_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", | 315 | debug("get_latch_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", |
316 | (ulong) hotplug_slot, (ulong) value); | 316 | (ulong) hotplug_slot, (ulong) value); |
317 | ibmphp_lock_operations(); | 317 | ibmphp_lock_operations(); |
318 | if (hotplug_slot && value) { | 318 | if (hotplug_slot) { |
319 | pslot = hotplug_slot->private; | 319 | pslot = hotplug_slot->private; |
320 | if (pslot) { | 320 | if (pslot) { |
321 | memcpy(&myslot, pslot, sizeof(struct slot)); | 321 | memcpy(&myslot, pslot, sizeof(struct slot)); |
@@ -342,7 +342,7 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 * value) | |||
342 | debug("get_power_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", | 342 | debug("get_power_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", |
343 | (ulong) hotplug_slot, (ulong) value); | 343 | (ulong) hotplug_slot, (ulong) value); |
344 | ibmphp_lock_operations(); | 344 | ibmphp_lock_operations(); |
345 | if (hotplug_slot && value) { | 345 | if (hotplug_slot) { |
346 | pslot = hotplug_slot->private; | 346 | pslot = hotplug_slot->private; |
347 | if (pslot) { | 347 | if (pslot) { |
348 | memcpy(&myslot, pslot, sizeof(struct slot)); | 348 | memcpy(&myslot, pslot, sizeof(struct slot)); |
@@ -369,7 +369,7 @@ static int get_adapter_present(struct hotplug_slot *hotplug_slot, u8 * value) | |||
369 | debug("get_adapter_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", | 369 | debug("get_adapter_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", |
370 | (ulong) hotplug_slot, (ulong) value); | 370 | (ulong) hotplug_slot, (ulong) value); |
371 | ibmphp_lock_operations(); | 371 | ibmphp_lock_operations(); |
372 | if (hotplug_slot && value) { | 372 | if (hotplug_slot) { |
373 | pslot = hotplug_slot->private; | 373 | pslot = hotplug_slot->private; |
374 | if (pslot) { | 374 | if (pslot) { |
375 | memcpy(&myslot, pslot, sizeof(struct slot)); | 375 | memcpy(&myslot, pslot, sizeof(struct slot)); |
@@ -401,7 +401,7 @@ static int get_max_bus_speed(struct hotplug_slot *hotplug_slot, enum pci_bus_spe | |||
401 | 401 | ||
402 | ibmphp_lock_operations(); | 402 | ibmphp_lock_operations(); |
403 | 403 | ||
404 | if (hotplug_slot && value) { | 404 | if (hotplug_slot) { |
405 | pslot = hotplug_slot->private; | 405 | pslot = hotplug_slot->private; |
406 | if (pslot) { | 406 | if (pslot) { |
407 | rc = 0; | 407 | rc = 0; |
@@ -441,7 +441,7 @@ static int get_cur_bus_speed(struct hotplug_slot *hotplug_slot, enum pci_bus_spe | |||
441 | 441 | ||
442 | ibmphp_lock_operations(); | 442 | ibmphp_lock_operations(); |
443 | 443 | ||
444 | if (hotplug_slot && value) { | 444 | if (hotplug_slot) { |
445 | pslot = hotplug_slot->private; | 445 | pslot = hotplug_slot->private; |
446 | if (pslot) { | 446 | if (pslot) { |
447 | rc = get_cur_bus_info(&pslot); | 447 | rc = get_cur_bus_info(&pslot); |