iwlegacy: 4965-mac: Simplify the calculation of variables
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Thu, 4 Feb 2021 08:00:08 +0000 (16:00 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 8 Feb 2021 11:20:44 +0000 (13:20 +0200)
Fix the following coccicheck warnings:

./drivers/net/wireless/intel/iwlegacy/4965-mac.c:2596:54-56: WARNING !A
|| A && B is equivalent to !A || B.

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@codeaurora.org>
Link: https://lore.kernel.org/r/1612425608-40450-1-git-send-email-jiapeng.chong@linux.alibaba.com
drivers/net/wireless/intel/iwlegacy/4965-mac.c

index 98cd062..341d6a2 100644 (file)
@@ -2593,8 +2593,7 @@ out:
         */
        if (ret != IL_INVALID_STATION &&
            (!(il->stations[ret].used & IL_STA_UCODE_ACTIVE) ||
-            ((il->stations[ret].used & IL_STA_UCODE_ACTIVE) &&
-             (il->stations[ret].used & IL_STA_UCODE_INPROGRESS)))) {
+             (il->stations[ret].used & IL_STA_UCODE_INPROGRESS))) {
                IL_ERR("Requested station info for sta %d before ready.\n",
                       ret);
                ret = IL_INVALID_STATION;