From: Heinrich Schuchardt Date: Sun, 18 Mar 2018 12:12:14 +0000 (+0100) Subject: usb: f_mass_storage: simplify logical expression X-Git-Tag: v2018.05~10^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=48cdfa2f8177dbdfc77c365c0f3f918ceadbe484;p=u-boot usb: f_mass_storage: simplify logical expression An unsigned int is always >= 0. Signed-off-by: Heinrich Schuchardt --- diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index 1ecb92ac6b..7d7ed4242b 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;