[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: Tony Battersby <tonyb@cybernetics.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
Tony Battersby 2009-01-08 12:53:37 -05:00 committed by James Bottomley
parent d3ce65d126
commit 07b9d81e84
1 changed files with 1 additions and 1 deletions

View File

@ -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);