projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa9da8e
)
usb: f_mass_storage: simplify logical expression
author
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Sun, 18 Mar 2018 12:12:14 +0000
(13:12 +0100)
committer
Marek Vasut
<marex@denx.de>
Mon, 30 Apr 2018 17:38:09 +0000
(19:38 +0200)
An unsigned int is always >= 0.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
drivers/usb/gadget/f_mass_storage.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/f_mass_storage.c
b/drivers/usb/gadget/f_mass_storage.c
index 1ecb92ac6b81ed3db82a08b6e1a7d554003c0aec..7d7ed4242b8c98db93f75a4121043ac7333c4487 100644
(file)
--- 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;