wifi: rt2x00: Remove useless else if
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Fri, 6 Jan 2023 02:27:31 +0000 (10:27 +0800)
committerKalle Valo <kvalo@kernel.org>
Mon, 16 Jan 2023 16:23:49 +0000 (18:23 +0200)
The assignment of the else and else if branches is the same, so the else
if here is redundant, so we remove it.

./drivers/net/wireless/ralink/rt2x00/rt2800lib.c:8927:9-11: WARNING:
possible condition with no effect (if == else).

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3631
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230106022731.111243-1-jiapeng.chong@linux.alibaba.com
drivers/net/wireless/ralink/rt2x00/rt2800lib.c

index 12b700c..1226a88 100644 (file)
@@ -8924,8 +8924,6 @@ static void rt2800_rxiq_calibration(struct rt2x00_dev *rt2x00dev)
 
                                if (i < 2 && (bbptemp & 0x800000))
                                        result = (bbptemp & 0xffffff) - 0x1000000;
-                               else if (i == 4)
-                                       result = bbptemp;
                                else
                                        result = bbptemp;