Commit b6f0b0d016a254ff583fec26f2c9e21c1ae2fdf3
Committed by
Linus Torvalds
1 parent
f59154c53f
Exists in
master
and in
4 other branches
[PATCH] 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 <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>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
drivers/scsi/sym53c416.c
... | ... | @@ -809,7 +809,7 @@ |
809 | 809 | /* printk("sym53c416_reset\n"); */ |
810 | 810 | base = SCpnt->device->host->io_port; |
811 | 811 | /* search scsi_id - fixme, we shouldnt need to iterate for this! */ |
812 | - for(i = 0; i < host_index && scsi_id != -1; i++) | |
812 | + for(i = 0; i < host_index && scsi_id == -1; i++) | |
813 | 813 | if(hosts[i].base == base) |
814 | 814 | scsi_id = hosts[i].scsi_id; |
815 | 815 | outb(RESET_CHIP, base + COMMAND_REG); |