diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2018-03-18 13:12:14 +0100 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2018-04-30 19:38:09 +0200 |
commit | 48cdfa2f8177dbdfc77c365c0f3f918ceadbe484 (patch) | |
tree | 6e632fc8356339200f32c1cb0346ddab0d1d2912 | |
parent | fa9da8ee60a7387b9e9b0358bd73ef5dbc73736c (diff) | |
download | u-boot-48cdfa2f8177dbdfc77c365c0f3f918ceadbe484.zip u-boot-48cdfa2f8177dbdfc77c365c0f3f918ceadbe484.tar.gz u-boot-48cdfa2f8177dbdfc77c365c0f3f918ceadbe484.tar.bz2 |
usb: f_mass_storage: simplify logical expression
An unsigned int is always >= 0.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
-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 1ecb92a..7d7ed42 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -1744,7 +1744,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]; if (common->cmnd[0] != SC_REQUEST_SENSE) { curlun->sense_data = SS_NO_SENSE; |