|
@@ -2285,7 +2285,7 @@ static int check_command(struct fsg_dev *fsg, int cmnd_size,
|
|
fsg->lun = lun; // Use LUN from the command
|
|
fsg->lun = lun; // Use LUN from the command
|
|
|
|
|
|
/* Check the LUN */
|
|
/* Check the LUN */
|
|
- if (fsg->lun >= 0 && fsg->lun < fsg->nluns) {
|
|
|
|
|
|
+ if (fsg->lun < fsg->nluns) {
|
|
fsg->curlun = curlun = &fsg->luns[fsg->lun];
|
|
fsg->curlun = curlun = &fsg->luns[fsg->lun];
|
|
if (fsg->cmnd[0] != REQUEST_SENSE) {
|
|
if (fsg->cmnd[0] != REQUEST_SENSE) {
|
|
curlun->sense_data = SS_NO_SENSE;
|
|
curlun->sense_data = SS_NO_SENSE;
|