Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6442798

Browse files
Vijayanand Jittatorvalds
Vijayanand Jitta
authored andcommittedFeb 26, 2021
lib: stackdepot: fix ignoring return value warning
Fix the below ignoring return value warning for kstrtobool in is_stack_depot_disabled function. lib/stackdepot.c: In function 'is_stack_depot_disabled': lib/stackdepot.c:154:2: warning: ignoring return value of 'kstrtobool' declared with attribute 'warn_unused_result' [-Wunused-result] Link: https://lkml.kernel.org/r/[email protected] Fixes: b9779ab ("lib: stackdepot: add support to disable stack depot") Signed-off-by: Vijayanand Jitta <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent e1fdc40 commit 6442798

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎lib/stackdepot.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,10 @@ static struct stack_record **stack_table;
151151

152152
static int __init is_stack_depot_disabled(char *str)
153153
{
154-
kstrtobool(str, &stack_depot_disable);
155-
if (stack_depot_disable) {
154+
int ret;
155+
156+
ret = kstrtobool(str, &stack_depot_disable);
157+
if (!ret && stack_depot_disable) {
156158
pr_info("Stack Depot is disabled\n");
157159
stack_table = NULL;
158160
}

0 commit comments

Comments
 (0)
Failed to load comments.