diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-12-10 01:45:40 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-12-10 01:45:40 +0100 |
commit | 96f774106ed48808a5e314741e3414c617d14460 (patch) | |
tree | a0beee162eeaf4813495ee28d3cfdd06effbc8be /drivers/tty/serial/kgdboc.c | |
parent | sbitmap: silence bogus lockdep IRQ warning (diff) | |
parent | Linux 4.20-rc6 (diff) | |
download | linux-96f774106ed48808a5e314741e3414c617d14460.tar.xz linux-96f774106ed48808a5e314741e3414c617d14460.zip |
Merge tag 'v4.20-rc6' into for-4.21/block
Pull in v4.20-rc6 to resolve the conflict in NVMe, but also to get the
two corruption fixes. We're going to be overhauling the direct dispatch
path, and we need to do that on top of the changes we made for that
in mainline.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/tty/serial/kgdboc.c')
-rw-r--r-- | drivers/tty/serial/kgdboc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c index baeeeaec3f03..6fb312e7af71 100644 --- a/drivers/tty/serial/kgdboc.c +++ b/drivers/tty/serial/kgdboc.c @@ -233,7 +233,7 @@ static void kgdboc_put_char(u8 chr) static int param_set_kgdboc_var(const char *kmessage, const struct kernel_param *kp) { - int len = strlen(kmessage); + size_t len = strlen(kmessage); if (len >= MAX_CONFIG_LEN) { pr_err("config string too long\n"); @@ -254,7 +254,7 @@ static int param_set_kgdboc_var(const char *kmessage, strcpy(config, kmessage); /* Chop out \n char as a result of echo */ - if (config[len - 1] == '\n') + if (len && config[len - 1] == '\n') config[len - 1] = '\0'; if (configured == 1) |