Skip to content

Commit

Permalink
[nrf fromlist] drivers: nrfwifi: Add a NULL check for FMAC context
Browse files Browse the repository at this point in the history
In case the driver UP fails, the FMAC context will be NULL, so, add a
NULL check in the DOWN.

Fixes a crash seen when working with unprogrammed OTP (no MAC) that
fails the interface UP.

Upstream PR #: 80858

Signed-off-by: Chaitanya Tata <[email protected]>
  • Loading branch information
krish2718 authored and rlubos committed Nov 5, 2024
1 parent 0d1bb86 commit 0debaa0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/wifi/nrfwifi/src/net_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ int nrf_wifi_if_stop_zep(const struct device *dev)
}

rpu_ctx_zep = vif_ctx_zep->rpu_ctx_zep;
if (!rpu_ctx_zep) {
if (!rpu_ctx_zep || !rpu_ctx_zep->rpu_ctx) {
LOG_ERR("%s: rpu_ctx_zep is NULL",
__func__);
goto unlock;
Expand Down

0 comments on commit 0debaa0

Please sign in to comment.