]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/scsi_scan.c
[SCSI] Return -EINVAL when "id == max_id" in scsi_scan_host_selected()
[linux-2.6-omap-h63xx.git] / drivers / scsi / scsi_scan.c
index f85d9100f554ee7a232e177074a5c6ccf38a1046..fd97d07577ad042f328a7b30b103a0abb6a9b405 100644 (file)
@@ -1503,7 +1503,7 @@ int scsi_scan_host_selected(struct Scsi_Host *shost, unsigned int channel,
                __FUNCTION__, channel, id, lun));
 
        if (((channel != SCAN_WILD_CARD) && (channel > shost->max_channel)) ||
-           ((id != SCAN_WILD_CARD) && (id > shost->max_id)) ||
+           ((id != SCAN_WILD_CARD) && (id >= shost->max_id)) ||
            ((lun != SCAN_WILD_CARD) && (lun > shost->max_lun)))
                return -EINVAL;