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:
parent
f9386683a3
commit
f0cdaace22
1 changed files with 1 additions and 0 deletions
|
|
@ -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 */
|
/* log_filter_set() takes an int16_t for the source ID */
|
||||||
if (source_id < 0) {
|
if (source_id < 0) {
|
||||||
shell_error(sh, "Unable to find log source: %s", argv[1]);
|
shell_error(sh, "Unable to find log source: %s", argv[1]);
|
||||||
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_filter_set(NULL, 0, (int16_t)source_id, severity);
|
log_filter_set(NULL, 0, (int16_t)source_id, severity);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue