From: Jiapeng Chong Date: Thu, 4 Feb 2021 08:00:08 +0000 (+0800) Subject: iwlegacy: 4965-mac: Simplify the calculation of variables X-Git-Tag: io_uring-worker.v3-2021-02-25~99^2~62^2~22 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=fcb8f3ca4b5bd991fbbc8465cdac8f84cc668410;p=linux-block.git iwlegacy: 4965-mac: Simplify the calculation of variables 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 Signed-off-by: Jiapeng Chong Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1612425608-40450-1-git-send-email-jiapeng.chong@linux.alibaba.com --- diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c index 98cd06287b43..341d6a2bc690 100644 --- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c @@ -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;