diff options
| author | Johannes Berg <[email protected]> | 2025-01-02 14:20:03 +0000 |
|---|---|---|
| committer | Johannes Berg <[email protected]> | 2025-01-13 14:34:09 +0000 |
| commit | 63a59880ec116cebb8a01ead28b1b23c3846ebb9 (patch) | |
| tree | 120840c6d1b84117b810b91b8e01b13e578d9306 /drivers/net/wireless/intel/iwlwifi/mvm/binding.c | |
| parent | wifi: nl80211: simplify nested if checks (diff) | |
| download | kernel-63a59880ec116cebb8a01ead28b1b23c3846ebb9.tar.gz kernel-63a59880ec116cebb8a01ead28b1b23c3846ebb9.zip | |
wifi: iwlwifi: simplify nested if checks
In the absence of (an) else clause(s), "if (a) if (b)" is
equivalent to "if (a && b)", so simplify the code a bit.
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20250102161730.7ddc9cb1ea50.If18bd94706d6c821e34c38a4704bf85dca6207b2@changeid
Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/binding.c')
| -rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/binding.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/binding.c b/drivers/net/wireless/intel/iwlwifi/mvm/binding.c index 458b97930059..58e9a940024d 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/binding.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/binding.c @@ -2,7 +2,7 @@ /* * Copyright (C) 2012-2014, 2020 Intel Corporation * Copyright (C) 2016 Intel Deutschland GmbH - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022, 2024 Intel Corporation */ #include <net/mac80211.h> #include "fw-api.h" @@ -158,9 +158,8 @@ int iwl_mvm_binding_remove_vif(struct iwl_mvm *mvm, struct ieee80211_vif *vif) ret = iwl_mvm_binding_update(mvm, vif, mvmvif->deflink.phy_ctxt, false); - if (!ret) - if (iwl_mvm_sf_update(mvm, vif, true)) - IWL_ERR(mvm, "Failed to update SF state\n"); + if (!ret && iwl_mvm_sf_update(mvm, vif, true)) + IWL_ERR(mvm, "Failed to update SF state\n"); return ret; } |
