diff options
author | Haim Dreyfuss <[email protected]> | 2023-05-24 20:42:03 +0300 |
---|---|---|
committer | Johannes Berg <[email protected]> | 2023-06-06 13:04:02 +0200 |
commit | cad7850ac0f597cd462b263a6395c5cd0ad8e760 (patch) | |
tree | f0f8697dc38defd1f1722a8830088ca47d3f7c49 | |
parent | 0945f9762ec3766186a179f7ccd001a3e160e3a0 (diff) |
wifi: iwlwifi: don't silently ignore missing suspend or resume ops
In case the driver doesn't implement suspend or resume operations
on the transport layer, notify the driver's upper layer.
Otherwise, we might access d3_status uninitialized.
Signed-off-by: Haim Dreyfuss <[email protected]>
Signed-off-by: Gregory Greenman <[email protected]>
Link: https://lore.kernel.org/r/20230524203151.0c55e0ca92f1.I6870fe1683215e65d3d036f9b576b03b7b7257be@changeid
Signed-off-by: Johannes Berg <[email protected]>
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h index 9f1228b5a384..885581e636c7 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h @@ -1160,7 +1160,7 @@ static inline int iwl_trans_d3_suspend(struct iwl_trans *trans, bool test, { might_sleep(); if (!trans->ops->d3_suspend) - return 0; + return -EOPNOTSUPP; return trans->ops->d3_suspend(trans, test, reset); } @@ -1171,7 +1171,7 @@ static inline int iwl_trans_d3_resume(struct iwl_trans *trans, { might_sleep(); if (!trans->ops->d3_resume) - return 0; + return -EOPNOTSUPP; return trans->ops->d3_resume(trans, status, test, reset); } |