usb: f_mass_storage: simplify logical expression
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 18 Mar 2018 12:12:14 +0000 (13:12 +0100)
committerMarek 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

index 1ecb92ac6b81ed3db82a08b6e1a7d554003c0aec..7d7ed4242b8c98db93f75a4121043ac7333c4487 100644 (file)
@@ -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;