Commit d8187b945aa4ed9ea298518e3dac691ea09724e5

Authored by Roel Kluin
Committed by Linus Torvalds
1 parent 702a98c633

dc395x: decrease iteration for tag_number of max_command in start_scsi()

The tag_number reaches dcb->max_command + 1 after the loop, but when
the tag_number equals dcb->max_command an error message is already
issued. The last iteration therefore appears obsolete.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/scsi/dc395x.c
... ... @@ -1597,7 +1597,7 @@
1597 1597 u32 tag_mask = 1;
1598 1598 u8 tag_number = 0;
1599 1599 while (tag_mask & dcb->tag_mask
1600   - && tag_number <= dcb->max_command) {
  1600 + && tag_number < dcb->max_command) {
1601 1601 tag_mask = tag_mask << 1;
1602 1602 tag_number++;
1603 1603 }