]> pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[SCSI] Return -EINVAL when "id == max_id" in scsi_scan_host_selected()
authorAmit Arora <aarora@in.ibm.com>
Fri, 19 May 2006 23:14:50 +0000 (16:14 -0700)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sun, 28 May 2006 17:01:23 +0000 (13:01 -0400)
commit091686d3b5569d2ec76b9e6dab7f3608b6f64497
tree8e2e85f774899d72b5419fdfb574dd994c35f8fd
parent93ef588735973e4c35ff3707685678cdebd694a4
[SCSI] Return -EINVAL when "id == max_id" in scsi_scan_host_selected()

The scsi_scan_host_selected() should return -EINVAL when the id is equal
to the max_id. Currently it uses ">" when comparing with max_id, and
hence leaves the border case when "id==max_id".
The channel and lun have values valid from 0 up to,
and including, max_channel or max_lun. But, the valid values for id
range from 0 to max_id-1. This patch fixes the problem.

Signed-off-by: Amit Arora <aarora@in.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi_scan.c