shell: modules: kernel_service: Fix log_level command

Add missing return when input logging source argument is not valid.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruściński 2025-01-15 08:52:38 +01:00 committed by Benjamin Cabé
parent f9386683a3
commit f0cdaace22

View file

@ -34,6 +34,7 @@ static int cmd_kernel_log_level_set(const struct shell *sh, size_t argc, char **
/* log_filter_set() takes an int16_t for the source ID */
if (source_id < 0) {
shell_error(sh, "Unable to find log source: %s", argv[1]);
return -EINVAL;
}
log_filter_set(NULL, 0, (int16_t)source_id, severity);