Skip to contentSkip to conversation

drivers/scsi/imm.c: fix check-after-use

PATCH In review [email protected] 1 participant 1 message Oct 2, 2007 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 13/17 drivers/scsi/imm.c: fix check-after-use

From: Adrian Bunk <[email protected]>

The Coverity checker spotted that we have already oops'ed if "cmd" was NULL.

Since "cmd" being NULL doesn't seem to be possible at this point this patch removes the NULL check.

---

 drivers/scsi/imm.c |    4 ----
 1 file changed, 4 deletions(-)
drivers/scsi/imm.c renamed from drivers/scsi/imm.c~drivers-scsi-immc-fix-check-after-use +0 -4
diff -puN drivers/scsi/imm.c~drivers-scsi-immc-fix-check-after-use drivers/scsi/imm.c
@@ -740,10 +740,6 @@ static void imm_interrupt(struct work_st
 	struct Scsi_Host *host = cmd->device->host;
 	unsigned long flags;
 
-	if (!cmd) {
-		printk("IMM: bug in imm_interrupt\n");
-		return;
-	}
 	if (imm_engine(dev, cmd)) {
 		schedule_delayed_work(&dev->imm_tq, 1);
 		return;

_