]> Pileus Git - ~andy/linux/commitdiff
[SCSI] imm: fix check-after-use
authorAdrian Bunk <bunk@kernel.org>
Tue, 2 Oct 2007 21:38:09 +0000 (14:38 -0700)
committerJames Bottomley <jejb@mulgrave.localdomain>
Fri, 12 Oct 2007 18:54:33 +0000 (14:54 -0400)
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.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/imm.c

index 005d2b05f32d2fbbec6dc50b54f0cff850cd2808..74cdc1f0a78f976bbf2d64397566430caba7ca32 100644 (file)
@@ -740,10 +740,6 @@ static void imm_interrupt(struct work_struct *work)
        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;