Disable kgdboc failed by echo space to /sys/module/kgdboc/parameters/kgdboc
authorWentao Wang <witallwang@gmail.com>
Wed, 20 Mar 2019 15:30:39 +0000 (15:30 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2019 04:26:26 +0000 (06:26 +0200)
commitc956914f1efa6d4771881d49d3d08850048b3fec
tree17c3800ed7eaae123773ea03f7badd81afc4583d
parent1c992ea006ce2b7c79862943d275145986b28ea0
Disable kgdboc failed by echo space to /sys/module/kgdboc/parameters/kgdboc

commit 3ec8002951ea173e24b466df1ea98c56b7920e63 upstream.

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 <witallwang@gmail.com>
Cc: stable <stable@vger.kernel.org>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/kgdboc.c