Skip to content

Commit 3ed7c61

Browse files
rddunlapandreas-gaisler
authored andcommitted
sparc64: NMI watchdog: fix return value of __setup handler
__setup() handlers should return 1 to obsolete_checksetup() in init/main.c to indicate that the boot option has been handled. A return of 0 causes the boot option/value to be listed as an Unknown kernel parameter and added to init's (limited) argument or environment strings. Also, error return codes don't mean anything to obsolete_checksetup() -- only non-zero (usually 1) or zero. So return 1 from setup_nmi_watchdog(). Fixes: e5553a6 ("sparc64: Implement NMI watchdog on capable cpus.") Signed-off-by: Randy Dunlap <[email protected]> Reported-by: Igor Zhbanov <[email protected]> Link: lore.kernel.org/r/[email protected] Cc: "David S. Miller" <[email protected]> Cc: [email protected] Cc: Sam Ravnborg <[email protected]> Cc: Andrew Morton <[email protected]> Cc: [email protected] Cc: Arnd Bergmann <[email protected]> Cc: Andreas Larsson <[email protected]> Signed-off-by: Andreas Larsson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 079431e commit 3ed7c61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/sparc/kernel/nmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ static int __init setup_nmi_watchdog(char *str)
279279
if (!strncmp(str, "panic", 5))
280280
panic_on_timeout = 1;
281281

282-
return 0;
282+
return 1;
283283
}
284284
__setup("nmi_watchdog=", setup_nmi_watchdog);
285285

0 commit comments

Comments
 (0)