Commit 966b5a0f authored by Rusty Russell's avatar Rusty Russell Committed by James Bottomley

[PATCH] [Trivial Patch] scsi_register-008

From:  Michael Still <mikal@stillhq.com>


  This patch has been generated as part of my scsi_register audit of the 2.5.45 kernel tree. scsi_register() can fail, returning a NULL pointer, and the failure case was not being handled here...
parent 01c7129b
......@@ -4220,6 +4220,9 @@ GDTH_INITFUNC(int, gdth_detect(Scsi_Host_Template *shtp))
if (gdth_ctr_count >= MAXHA)
break;
shp = scsi_register(shtp,sizeof(gdth_ext_str));
if(shp == NULL)
continue;
ha = HADATA(shp);
if (!gdth_init_pci(&pcistr[ctr],ha)) {
scsi_unregister(shp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment