diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-03-10 23:24:47 +0100 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-12 09:46:11 -0600 |
commit | a6becb084d4beb0b0c83651541f5b53f6da01e36 (patch) | |
tree | df88f32a2874731289c094c556ea19257eea65d7 /drivers/scsi | |
parent | c3c026ba5a16867af47578ab2030ef51f9080084 (diff) | |
download | op-kernel-dev-a6becb084d4beb0b0c83651541f5b53f6da01e36.zip op-kernel-dev-a6becb084d4beb0b0c83651541f5b53f6da01e36.tar.gz |
[SCSI] ibmmca: fix a NULL pointer dereference
The variable was dereferenced only if it was NULL (sic)...
Spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ibmmca.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/ibmmca.c b/drivers/scsi/ibmmca.c index b60c1b9..3a8462e 100644 --- a/drivers/scsi/ibmmca.c +++ b/drivers/scsi/ibmmca.c @@ -2412,8 +2412,7 @@ static int ibmmca_proc_info(struct Scsi_Host *shpnt, char *buffer, char **start, spin_lock_irqsave(hosts[i]->host_lock, flags); /* Check it */ host_index = i; if (!shpnt) { - len += sprintf(buffer + len, "\nIBM MCA SCSI: Can't find adapter for host number %d\n", - shpnt->host_no); + len += sprintf(buffer + len, "\nIBM MCA SCSI: Can't find adapter"); return len; } max_pun = subsystem_maxid(host_index); |