aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/sym53c8xx_2
diff options
context:
space:
mode:
authorTony Battersby <tonyb@cybernetics.com>2009-01-08 12:53:37 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-03-12 12:58:15 -0500
commit07b9d81e849f64b990e943de6ad75b63dafe5a4b (patch)
tree474e020b1473ffb780a198782570b50c8f76ca3b /drivers/scsi/sym53c8xx_2
parentd3ce65d12668ef1e3a164d48e04c59228d5ecf7b (diff)
[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>
Diffstat (limited to 'drivers/scsi/sym53c8xx_2')
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index ff5be958d3d..cef03e76836 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -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);