Skip to content

Commit f0cdaac

Browse files
nordic-krchkartben
authored andcommitted
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 <[email protected]>
1 parent f938668 commit f0cdaac

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

subsys/shell/modules/kernel_service/log-level.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ static int cmd_kernel_log_level_set(const struct shell *sh, size_t argc, char **
3434
/* log_filter_set() takes an int16_t for the source ID */
3535
if (source_id < 0) {
3636
shell_error(sh, "Unable to find log source: %s", argv[1]);
37+
return -EINVAL;
3738
}
3839

3940
log_filter_set(NULL, 0, (int16_t)source_id, severity);

0 commit comments

Comments
 (0)