mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 05:32:00 +00:00
[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>
This commit is contained in:
parent
c3c026ba5a
commit
a6becb084d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user