Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: ftdi-elan: fix possible condition with no effect (if == else)

fix below warning reported by coccicheck

./drivers/usb/misc/ftdi-elan.c:2026:11-13: WARNING: possible condition
with no effect (if == else)

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Hariprasad Kelam and committed by
Greg Kroah-Hartman
8e4c5d31 53cdff30

-7
-7
drivers/usb/misc/ftdi-elan.c
··· 2023 2023 goto read; 2024 2024 } else 2025 2025 goto reset; 2026 - } else if (s1 == 0x31 && s2 == 0x60) { 2027 - if (read_stop-- > 0) { 2028 - goto read; 2029 - } else { 2030 - dev_err(&ftdi->udev->dev, "retry limit reached\n"); 2031 - continue; 2032 - } 2033 2026 } else { 2034 2027 if (read_stop-- > 0) { 2035 2028 goto read;