diff options
author | Maxin B John <maxin.john@gmail.com> | 2011-05-08 12:56:17 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-10 21:14:59 (GMT) |
commit | 849426c3a430a6fb4613b0e5dbb81bcd6b10a075 (patch) | |
tree | baf5dafdf261055fc60f3d0b508c2d3fea6605c0 /drivers/usb/gadget/f_mass_storage.c | |
parent | 304b0b572c66bcd89df13e856db16503609c1a24 (diff) | |
download | linux-fsl-qoriq-849426c3a430a6fb4613b0e5dbb81bcd6b10a075.tar.xz |
usb: gadget: Remove the LUN checks which are always true
Comparing an unsigned integer with greater than or equal to zero is
always true. So, it is safe to remove similar checks from
'f_mass_storage.c' and 'file_storage.c'
Signed-off-by: Maxin B. John <maxin.john@gmail.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/f_mass_storage.c')
-rw-r--r-- | drivers/usb/gadget/f_mass_storage.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index ad96be8..efb58f9 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -1884,7 +1884,7 @@ static int check_command(struct fsg_common *common, int cmnd_size, common->lun, lun); /* Check the LUN */ - if (common->lun >= 0 && common->lun < common->nluns) { + if (common->lun < common->nluns) { curlun = &common->luns[common->lun]; common->curlun = curlun; if (common->cmnd[0] != REQUEST_SENSE) { |