From: Geyslan G. Bem Date: Fri, 11 Dec 2015 09:46:42 +0000 (-0300) Subject: USB: mos7840: remove redundant condition X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=365a0442f6def11b0b3012778d6a838c7a8e6912;p=linux-beck.git USB: mos7840: remove redundant condition 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 Signed-off-by: Johan Hovold --- diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 8ac9b55f05af..2c69bfcdacc6 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c @@ -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; }