]> Git Repo - linux.git/commit
wifi: iwlwifi: mvm: check vif for NULL/ERR_PTR before dereference
authorMiri Korenblit <[email protected]>
Wed, 3 Jul 2024 03:43:15 +0000 (06:43 +0300)
committerJohannes Berg <[email protected]>
Wed, 3 Jul 2024 14:06:54 +0000 (16:06 +0200)
commit4130c67cd123a36c902cbe9ce5a2efbc33eb18c0
treeba09e794069826385f26301942be7cd55cec49d4
parent28e02bc9f412c3344b0e1f0c657dc6305ac75b4c
wifi: iwlwifi: mvm: check vif for NULL/ERR_PTR before dereference

iwl_mvm_get_bss_vif might return a NULL or ERR_PTR. Some of the callers
check only the NULL case, and some doesn't check at all.

Some of the callers even have a pointer to the mvmvif of the bss vif,
so we don't even need to call this function, and can simply get the vif
from mvmvif. Do it for those cases, and for the others - properly check
if IS_ERR_OR_NULL

Fixes: ec0d43d26f2c ("wifi: iwlwifi: mvm: Activate EMLSR based on traffic volume")
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240703064027.a661f8c65aac.I45cf09b01af8ee3d55828863958ead741ea43b7f@changeid
Signed-off-by: Johannes Berg <[email protected]>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/ops.c
drivers/net/wireless/intel/iwlwifi/mvm/rx.c
This page took 0.056287 seconds and 4 git commands to generate.