[PATCH RFC net] wifi: iwlwifi: mvm: normalize failed wakeup status queries

From: Slavin Liu

Date: Fri Sep 11 2026 - 02:12:19 EST


GET_STATUS may return ERR_PTR. Convert it to the NULL failure state
expected by the existing wakeup-query paths, preserving their mutex
release and cleanup instead of returning directly from the caller.

Detected by static analysis and reviewed with AI-assisted source auditing.

Fixes: 537b76d26cbb ("iwlwifi: mvm: use NULL instead of ERR_PTR when parsing wowlan status")
Assisted-by: LLM
Signed-off-by: Slavin Liu <bolin.liu@xxxxxxxxxx>
---
drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
index 6b11fa32ea5c..9bbf4185eab5 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
@@ -2747,6 +2747,8 @@ iwl_mvm_choose_query_wakeup_reasons(struct iwl_mvm *mvm,

d3_data->status = iwl_mvm_send_wowlan_get_status(mvm, sta_id);
}
+ if (IS_ERR(d3_data->status))
+ d3_data->status = NULL;

if (mvm->net_detect) {
iwl_mvm_query_netdetect_reasons(mvm, vif, d3_data);