]> err.no Git - linux-2.6/commitdiff
[SCSI] drivers/scsi/sym53c416.c: fix a wrong check
authorAdrian Bunk <bunk@stusta.de>
Sun, 1 May 2005 23:47:10 +0000 (01:47 +0200)
committerJames Bottomley <jejb@mulgrave.(none)>
Fri, 20 May 2005 17:53:47 +0000 (12:53 -0500)
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>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/sym53c416.c

index f26c3a29e631e88184af3cca14254f0e6128cba0..ebfddd40ce67322840d8e115bbe773617126de2a 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);