Skip to contentSkip to conversation

scsi/aic7xxx_old.c: fix NULL check

PATCH New Adrian Bunk 1 participant 1 message Oct 18, 2007 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi/aic7xxx_old.c: fix NULL check

Commit bbfbbbc1182f8b44c8cc4c99f4a3f3a512149022 accidentally reversed the logic of this NULL check.

Spotted by the Coverity checker.

---
ee645f41f64ebeb782a0ca2e724dff929f854b68

drivers/scsi/aic7xxx_old.c +1 -1
index 4025608..8f8db5f 100644
@@ -8417,7 +8417,7 @@ aic7xxx_alloc(struct scsi_host_template *sht, struct aic7xxx_host *temp)
     p->host = host;
 
     p->scb_data = kzalloc(sizeof(scb_data_type), GFP_ATOMIC);
-    if (!p->scb_data)
+    if (p->scb_data)
     {
       scbq_init (&p->scb_data->free_scbs);
     }