diff options
| author | Marek Vasut <[email protected]> | 2023-05-27 22:28:33 +0000 |
|---|---|---|
| committer | Kalle Valo <[email protected]> | 2023-06-08 16:00:39 +0000 |
| commit | b241e260820b68c09586e8a0ae0fc23c0e3215bd (patch) | |
| tree | ae1fb1e9f45f7094d2b5e5a7b2800da3e03ffaac /net/nsh/nsh.c | |
| parent | wifi: brcmfmac: Detect corner error case earlier with log (diff) | |
| download | kernel-b241e260820b68c09586e8a0ae0fc23c0e3215bd.tar.gz kernel-b241e260820b68c09586e8a0ae0fc23c0e3215bd.zip | |
wifi: rsi: Do not configure WoWlan in shutdown hook if not enabled
In case WoWlan was never configured during the operation of the system,
the hw->wiphy->wowlan_config will be NULL. rsi_config_wowlan() checks
whether wowlan_config is non-NULL and if it is not, then WARNs about it.
The warning is valid, as during normal operation the rsi_config_wowlan()
should only ever be called with non-NULL wowlan_config. In shutdown this
rsi_config_wowlan() should only ever be called if WoWlan was configured
before by the user.
Add checks for non-NULL wowlan_config into the shutdown hook. While at it,
check whether the wiphy is also non-NULL before accessing wowlan_config .
Drop the single-use wowlan_config variable, just inline it into function
call.
Fixes: 16bbc3eb8372 ("rsi: fix null pointer dereference during rsi_shutdown()")
Signed-off-by: Marek Vasut <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'net/nsh/nsh.c')
0 files changed, 0 insertions, 0 deletions
