aboutsummaryrefslogtreecommitdiffstats
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 13:58:15 -0400
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 ff5be958d3d3..cef03e768367 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,
1418 attach_failed: 1418 attach_failed:
1419 if (!shost) 1419 if (!shost)
1420 return NULL; 1420 return NULL;
1421 printf_info("%s: giving up ...\n", sym_name(np)); 1421 printf_info("sym%d: giving up ...\n", unit);
1422 if (np) 1422 if (np)
1423 sym_free_resources(np, pdev); 1423 sym_free_resources(np, pdev);
1424 scsi_host_put(shost); 1424 scsi_host_put(shost);