summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorLaura Abbott <labbott@redhat.com>2018-09-10 16:20:14 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-13 09:22:30 +0100
commit5cd41dce77378296ab3c2a890c60ef22895ae4d7 (patch)
treea473ed893bd6a8dc0e12c1e47c95b3673db5b3fb /drivers/tty
parentc221c390c3d190b40a825eafa0f25971491b3404 (diff)
downloadlinux-stable-5cd41dce77378296ab3c2a890c60ef22895ae4d7.tar.gz
linux-stable-5cd41dce77378296ab3c2a890c60ef22895ae4d7.tar.bz2
linux-stable-5cd41dce77378296ab3c2a890c60ef22895ae4d7.zip
kgdboc: Fix restrict error
commit 2dd453168643d9475028cd867c57e65956a0f7f9 upstream. There's an error when compiled with restrict: drivers/tty/serial/kgdboc.c: In function ‘configure_kgdboc’: drivers/tty/serial/kgdboc.c:137:2: error: ‘strcpy’ source argument is the same as destination [-Werror=restrict] strcpy(config, opt); ^~~~~~~~~~~~~~~~~~~ As the error implies, this is from trying to use config as both source and destination. Drop the call to the function where config is the argument since nothing else happens in the function. Signed-off-by: Laura Abbott <labbott@redhat.com> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/kgdboc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c
index 2db68dfe497d..da020eea7bb5 100644
--- a/drivers/tty/serial/kgdboc.c
+++ b/drivers/tty/serial/kgdboc.c
@@ -162,15 +162,13 @@ static int configure_kgdboc(void)
{
struct tty_driver *p;
int tty_line = 0;
- int err;
+ int err = -ENODEV;
char *cptr = config;
struct console *cons;
- err = kgdboc_option_setup(config);
- if (err || !strlen(config) || isspace(config[0]))
+ if (!strlen(config) || isspace(config[0]))
goto noconfig;
- err = -ENODEV;
kgdboc_io_ops.is_console = 0;
kgdb_tty_driver = NULL;