From 07b9d81e849f64b990e943de6ad75b63dafe5a4b Mon Sep 17 00:00:00 2001 From: Tony Battersby Date: Thu, 8 Jan 2009 12:53:37 -0500 Subject: [PATCH] [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 Signed-off-by: James Bottomley --- drivers/scsi/sym53c8xx_2/sym_glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, 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); -- 2.39.5