Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6f0b0d0 authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds
Browse files

[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: default avatarAdrian Bunk <bunk@stusta.de>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Matthew Wilcox <willy@debian.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f59154c5
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -809,7 +809,7 @@ static int sym53c416_host_reset(Scsi_Cmnd *SCpnt)
	/* printk("sym53c416_reset\n"); */
	/* printk("sym53c416_reset\n"); */
	base = SCpnt->device->host->io_port;
	base = SCpnt->device->host->io_port;
	/* search scsi_id - fixme, we shouldnt need to iterate for this! */
	/* 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)
		if(hosts[i].base == base)
			scsi_id = hosts[i].scsi_id;
			scsi_id = hosts[i].scsi_id;
	outb(RESET_CHIP, base + COMMAND_REG);
	outb(RESET_CHIP, base + COMMAND_REG);