commit | 83fd2a2b3f576b311be83720f4292880a647bc0d | [log] [tgz] |
---|---|---|
author | Pisit Sawangvonganan <pisit@ndrsolution.com> | Fri Feb 09 21:03:47 2024 +0700 |
committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | Mon Feb 26 11:41:42 2024 +0000 |
tree | cceeb804b99e817e2727c51782cd9f37f7142541 | |
parent | 468eb56cf242eedba62006ee758700ee6148763f [diff] |
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: Pisit Sawangvonganan <pisit@ndrsolution.com> (cherry picked from commit 7b8a9e1818f75a2a61ea40537a9d4299eb3225a6)