[PATCH] drivers/scsi/sym53c416.c: fix a wrong check
authorAdrian Bunk <bunk@stusta.de>
Thu, 5 May 2005 23:16:22 +0000 (16:16 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 5 May 2005 23:36:51 +0000 (16:36 -0700)
The Coverity checker found that this for loop was wrong.

This patch changes it to what seems to be intended.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Matthew Wilcox <willy@debian.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/scsi/sym53c416.c

index f26c3a2..ebfddd4 100644 (file)
@@ -809,7 +809,7 @@ static int sym53c416_host_reset(Scsi_Cmnd *SCpnt)
        /* printk("sym53c416_reset\n"); */
        base = SCpnt->device->host->io_port;
        /* search scsi_id - fixme, we shouldnt need to iterate for this! */
-       for(i = 0; i < host_index && scsi_id != -1; i++)
+       for(i = 0; i < host_index && scsi_id == -1; i++)
                if(hosts[i].base == base)
                        scsi_id = hosts[i].scsi_id;
        outb(RESET_CHIP, base + COMMAND_REG);