提交 a6becb08 编写于 作者: A Adrian Bunk 提交者: James Bottomley

[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: NAdrian Bunk <bunk@stusta.de>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 c3c026ba
...@@ -2412,8 +2412,7 @@ static int ibmmca_proc_info(struct Scsi_Host *shpnt, char *buffer, char **start, ...@@ -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 */ spin_lock_irqsave(hosts[i]->host_lock, flags); /* Check it */
host_index = i; host_index = i;
if (!shpnt) { if (!shpnt) {
len += sprintf(buffer + len, "\nIBM MCA SCSI: Can't find adapter for host number %d\n", len += sprintf(buffer + len, "\nIBM MCA SCSI: Can't find adapter");
shpnt->host_no);
return len; return len;
} }
max_pun = subsystem_maxid(host_index); max_pun = subsystem_maxid(host_index);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册