diff options
| author | Greg Kroah-Hartman <greg@kroah.com> | 2003-02-06 15:15:13 +1100 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2003-02-06 15:15:13 +1100 |
| commit | a0347d12cfbc08ec3d8be022351c9916836c2beb (patch) | |
| tree | 05cb9dfd53e1a9c4b461dd0e2b0f70d95485d8e3 /drivers/hotplug/cpqphp_proc.c | |
| parent | 5ad0c9427d97547b6adbde4244f9732de6ba4248 (diff) | |
[PATCH] PCI Hotplug: dereference null variable cleanup patches.
These were pointed out by "dan carpenter" <error27@email.com>
from his smatch tool.
Diffstat (limited to 'drivers/hotplug/cpqphp_proc.c')
| -rw-r--r-- | drivers/hotplug/cpqphp_proc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hotplug/cpqphp_proc.c b/drivers/hotplug/cpqphp_proc.c index e06e929e95f1..2f56047eee58 100644 --- a/drivers/hotplug/cpqphp_proc.c +++ b/drivers/hotplug/cpqphp_proc.c @@ -113,6 +113,8 @@ static int read_dev (char *buf, char **start, off_t offset, int len, int *eof, v while (slot) { new_slot = cpqhp_slot_find(slot->bus, slot->device, 0); + if (!new_slot) + break; out += sprintf(out, "assigned resources: memory\n"); index = 11; res = new_slot->mem_head; |
