aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/stackdepot.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/stackdepot.c b/lib/stackdepot.c
index cc21116512a7..49f67a0c6e5d 100644
--- a/lib/stackdepot.c
+++ b/lib/stackdepot.c
@@ -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;
}