]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] sym53c8xx: fix NULL deref on error path
authorTony Battersby <tonyb@cybernetics.com>
Thu, 8 Jan 2009 17:53:37 +0000 (12:53 -0500)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Thu, 12 Mar 2009 17:58:15 +0000 (12:58 -0500)
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>
drivers/scsi/sym53c8xx_2/sym_glue.c

index ff5be958d3d33b4f8c6abd26dacb84bff348cd1c..cef03e76836790a49d80d25d77182edfd142f8ca 100644 (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);