From: Arnd Bergmann Date: Mon, 16 Nov 2009 05:13:21 +0000 (-0800) Subject: hamradio/mkiss: fix typo in compat_ioctl X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=07c3c4ee3a4143d0c8bb2e260c089bf012cf2c6e;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git hamradio/mkiss: fix typo in compat_ioctl My last commit introduced an typo causing the compat_ioctl function to do nothing useful. The obvious way for an ioctl function to work is to look at the command, not the argument first. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller --- diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index fc9c57893f8a..7db0a1c3216c 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c @@ -903,7 +903,7 @@ static int mkiss_ioctl(struct tty_struct *tty, struct file *file, static long mkiss_compat_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) { - switch (arg) { + switch (cmd) { case SIOCGIFNAME: case SIOCGIFENCAP: case SIOCSIFENCAP: