]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
USB: mos7840: remove redundant condition
authorGeyslan G. Bem <geyslan@gmail.com>
Fri, 11 Dec 2015 09:46:42 +0000 (06:46 -0300)
committerJohan Hovold <johan@kernel.org>
Fri, 11 Dec 2015 10:05:49 +0000 (11:05 +0100)
This patch removes redundant condition.

 (length && length > 5) can be reduced to a single evaluation.

Tested by compilation only.
Caught by cppcheck.

Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/mos7840.c

index 8ac9b55f05afb0c7d9c806f7b13773679ff402ac..2c69bfcdacc64e005ce294ccedb2d3ebf7d02a26 100644 (file)
@@ -635,7 +635,7 @@ static void mos7840_interrupt_callback(struct urb *urb)
         * Byte 4 IIR Port 4 (port.number is 3)
         * Byte 5 FIFO status for both */
 
-       if (length && length > 5) {
+       if (length > 5) {
                dev_dbg(&urb->dev->dev, "%s", "Wrong data !!!\n");
                return;
        }