projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
232dce8
)
USB: mos7840: remove redundant condition
author
Geyslan G. Bem
<geyslan@gmail.com>
Fri, 11 Dec 2015 09:46:42 +0000
(06:46 -0300)
committer
Johan 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
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/serial/mos7840.c
b/drivers/usb/serial/mos7840.c
index 8ac9b55f05afb0c7d9c806f7b13773679ff402ac..2c69bfcdacc64e005ce294ccedb2d3ebf7d02a26 100644
(file)
--- 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;
}