[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8d0346ba-4819-c25e-f208-0b51116d9147@gmail.com>
Date: Sun, 7 Nov 2021 01:12:44 +0300
From: Pavel Skripkin <paskripkin@...il.com>
To: Ajay Garg <ajaygargnsit@...il.com>, gregkh@...uxfoundation.org,
jirislaby@...nel.org, andriy.shevchenko@...ux.intel.com,
kernel@...il.dk, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] tty: vt: keyboard: add default switch-case, to handle
smatch-warnings in method vt_do_kdgkb_ioctl
On 11/7/21 01:03, Ajay Garg wrote:
> diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
> index c7fbbcdcc346..b83e7669658d 100644
> --- a/drivers/tty/vt/keyboard.c
> +++ b/drivers/tty/vt/keyboard.c
> @@ -2090,6 +2090,12 @@ int vt_do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm)
>
> ret = 0;
> break;
> + default: {
> + kbs = NULL;
> + ret = -ENOIOCTLCMD;
> +
> + break;
> + }
Are these brackets needed here? There are no local variables inside
default case.
just my 2c,
With regards,
Pavel Skripkin
Powered by blists - more mailing lists