FROMGIT: 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/1612163048-28026-1-git-send-email-vjitta@codeaurora.org
Fixes: b9779abb09a8 ("lib: stackdepot: add support to disable stack depot")
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
(cherry picked from commit 5b061c0c496dc06e6c8b1158788ec95110300845
 https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm)
Bug: 172318110
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Change-Id: Id5ea62127d37bd95e47436664728e6ef4fa0e675
This commit is contained in:
Vijayanand Jitta
2021-02-12 17:14:55 +11:00
committed by Alistair Delva
parent bfed1c3081
commit 3a0defe5db

View File

@@ -151,8 +151,10 @@ static struct stack_record **stack_table;
static int __init is_stack_depot_disabled(char *str)
{
kstrtobool(str, &stack_depot_disable);
if (stack_depot_disable) {
int ret;
ret = kstrtobool(str, &stack_depot_disable);
if (!ret && stack_depot_disable) {
pr_info("Stack Depot is disabled\n");
stack_table = NULL;
}