From: Wentao Wang Date: Wed, 20 Mar 2019 15:30:39 +0000 (+0000) Subject: Disable kgdboc failed by echo space to /sys/module/kgdboc/parameters/kgdboc X-Git-Tag: v5.4-rc1~1304^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ec8002951ea173e24b466df1ea98c56b7920e63;p=platform%2Fkernel%2Flinux-rpi.git Disable kgdboc failed by echo space to /sys/module/kgdboc/parameters/kgdboc Echo "" to /sys/module/kgdboc/parameters/kgdboc will fail with "No such deviceā€ error. This is caused by function "configure_kgdboc" who init err to ENODEV when the config is empty (legal input) the code go out with ENODEV returned. Fixes: 2dd453168643 ("kgdboc: Fix restrict error") Signed-off-by: Wentao Wang Cc: stable Acked-by: Daniel Thompson Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c index 6fb312e..bfe5e9e 100644 --- a/drivers/tty/serial/kgdboc.c +++ b/drivers/tty/serial/kgdboc.c @@ -148,8 +148,10 @@ static int configure_kgdboc(void) char *cptr = config; struct console *cons; - if (!strlen(config) || isspace(config[0])) + if (!strlen(config) || isspace(config[0])) { + err = 0; goto noconfig; + } kgdboc_io_ops.is_console = 0; kgdb_tty_driver = NULL;