]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: iwlegacy: 3945-rs: remove redundant pointer check in il3945_rs_tx_status()...
authorTuo Li <islituo@gmail.com>
Sun, 11 Jan 2026 17:11:18 +0000 (01:11 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 12 Jan 2026 18:42:49 +0000 (19:42 +0100)
The variable il_sta passed into these two functions cannot be NULL, so
remove the related null checks.

Signed-off-by: Tuo Li <islituo@gmail.com>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
Link: https://patch.msgid.link/20260111171118.203249-1-islituo@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlegacy/3945-rs.c

index 1826c37c090c91b39229a8b2021bd908a97b4ef4..ecc6c8d2a4c52bbfcd906ea39771af71c9f36f1b 100644 (file)
@@ -448,11 +448,6 @@ il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band *sband,
                return;
        }
 
-       if (!il_sta) {
-               D_RATE("leave: No STA il data to update!\n");
-               return;
-       }
-
        /* Treat uninitialized rate scaling data same as non-existing. */
        if (!rs_sta->il) {
                D_RATE("leave: STA il data uninitialized!\n");
@@ -627,7 +622,7 @@ il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta,
        D_RATE("enter\n");
 
        /* Treat uninitialized rate scaling data same as non-existing. */
-       if (rs_sta && !rs_sta->il) {
+       if (!rs_sta->il) {
                D_RATE("Rate scaling information not initialized yet.\n");
                il_sta = NULL;
        }