提交 07b9d81e 编写于 作者: T Tony Battersby 提交者: James Bottomley

[SCSI] sym53c8xx: fix NULL deref on error path

If sym_attach() fails to allocate np, the error path will dereference
a NULL pointer for printk.
Signed-off-by: NTony Battersby <tonyb@cybernetics.com>
Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
上级 d3ce65d1
......@@ -1418,7 +1418,7 @@ static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt,
attach_failed:
if (!shost)
return NULL;
printf_info("%s: giving up ...\n", sym_name(np));
printf_info("sym%d: giving up ...\n", unit);
if (np)
sym_free_resources(np, pdev);
scsi_host_put(shost);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册