drivers/scsi/sym53c416.c: fix a wrong check
PATCH 1/1 drivers/scsi/sym53c416.c: fix a wrong check
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 <[email protected]>
drivers/scsi/sym53c416.c renamed from drivers/scsi/sym53c416.c.old +1 -1
@@ -803,19 +803,19 @@static int sym53c416_host_reset (Scsi_Cmnd *SCpnt) {int base;int scsi_id =-1 ;int i;/* 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 );outb (NOOP |PIO_MODE , base +COMMAND_REG );outb (RESET_SCSI_BUS , base +COMMAND_REG );sym53c416_init (base, scsi_id);return SUCCESS ; }