diff options
Diffstat (limited to 'kernel/smp.c')
-rw-r--r-- | kernel/smp.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/smp.c b/kernel/smp.c index 7a85bcddd9dc..298ba7570621 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -116,11 +116,16 @@ static DEFINE_STATIC_KEY_MAYBE(CONFIG_CSD_LOCK_WAIT_DEBUG_DEFAULT, csdlock_debug */ static int __init csdlock_debug(char *str) { + int ret; unsigned int val = 0; - get_option(&str, &val); - if (val) - static_branch_enable(&csdlock_debug_enabled); + ret = get_option(&str, &val); + if (ret) { + if (val) + static_branch_enable(&csdlock_debug_enabled); + else + static_branch_disable(&csdlock_debug_enabled); + } return 1; } |