Skip to content

Commit c862253

Browse files
krish2718dkalowsk
authored andcommitted
drivers: nrfwifi: Add a NULL check for FMAC context
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. Signed-off-by: Chaitanya Tata <[email protected]>
1 parent c261bdf commit c862253

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/wifi/nrfwifi/src/net_if.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ int nrf_wifi_if_stop_zep(const struct device *dev)
877877
}
878878

879879
rpu_ctx_zep = vif_ctx_zep->rpu_ctx_zep;
880-
if (!rpu_ctx_zep) {
880+
if (!rpu_ctx_zep || !rpu_ctx_zep->rpu_ctx) {
881881
LOG_ERR("%s: rpu_ctx_zep is NULL",
882882
__func__);
883883
goto unlock;

0 commit comments

Comments
 (0)