shell: fix shell_stop command
Added missing condition to check if log backend is configured before calling the function: z_shell_log_backend_disable. Without this, in some configurations, a compilation error appeared due to calling a non-existent function. Fixes: #69555 Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
This commit is contained in:
parent
5bd03fd41b
commit
1261745b2c
1 changed files with 3 additions and 1 deletions
|
@ -1465,7 +1465,9 @@ int shell_stop(const struct shell *sh)
|
||||||
|
|
||||||
state_set(sh, SHELL_STATE_INITIALIZED);
|
state_set(sh, SHELL_STATE_INITIALIZED);
|
||||||
|
|
||||||
z_shell_log_backend_disable(sh->log_backend);
|
if (IS_ENABLED(CONFIG_SHELL_LOG_BACKEND)) {
|
||||||
|
z_shell_log_backend_disable(sh->log_backend);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue