mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
wifi: rtlwifi: rtl8821ae: Reverse PM Capability exists check
Check if PM Capability does not exists and return early which follows the usual error handling pattern. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20231124084725.12738-6-ilpo.jarvinen@linux.intel.com
This commit is contained in:
parent
6e071ae899
commit
760bfed912
1 changed files with 23 additions and 22 deletions
|
@ -2305,7 +2305,12 @@ static void _rtl8821ae_clear_pci_pme_status(struct ieee80211_hw *hw)
|
|||
}
|
||||
} while (cnt++ < 200);
|
||||
|
||||
if (cap_id == 0x01) {
|
||||
if (cap_id != 0x01) {
|
||||
rtl_dbg(rtlpriv, COMP_INIT, DBG_WARNING,
|
||||
"Cannot find PME Capability\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Get the PM CSR (Control/Status Register),
|
||||
* The PME_Status is located at PM Capatibility offset 5, bit 7
|
||||
*/
|
||||
|
@ -2326,10 +2331,6 @@ static void _rtl8821ae_clear_pci_pme_status(struct ieee80211_hw *hw)
|
|||
"PME status(0x%2x) = 0x%2x\n",
|
||||
cap_pointer + 5, pmcs_reg);
|
||||
}
|
||||
} else {
|
||||
rtl_dbg(rtlpriv, COMP_INIT, DBG_WARNING,
|
||||
"Cannot find PME Capability\n");
|
||||
}
|
||||
}
|
||||
|
||||
void rtl8821ae_card_disable(struct ieee80211_hw *hw)
|
||||
|
|
Loading…
Add table
Reference in a new issue