Skip to content
Commit 7b8a9e18 authored by Pisit Sawangvonganan's avatar Pisit Sawangvonganan Committed by Fabio Baltieri
Browse files

net: shell: ensure the shell `sh` is valid before call shell_printf



It is possible that the `sh` was not set before use.
This change adds a NULL check for `sh` in the following macros:
PR, PR_SHELL, PR_ERROR, PR_INFO, and PR_WARNING.
In case `sh` is NULL, the above macros will call `printk` instead.

Fixes #68793

Signed-off-by: default avatarPisit Sawangvonganan <pisit@ndrsolution.com>
parent f4c8020d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment