summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/slcan.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2021-09-14 11:11:23 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-22 16:59:13 +0200
commitdcc223e8b9bf3f987bcd3c327a6737022b39e35b (patch)
treeb4ebbd557bf2bb5836f4e6ea18f0ba7385799d87 /drivers/net/can/slcan.c
parenttty: make tty_ldisc_ops::hangup return void (diff)
downloadlinux-dcc223e8b9bf3f987bcd3c327a6737022b39e35b.tar.xz
linux-dcc223e8b9bf3f987bcd3c327a6737022b39e35b.zip
tty: remove file from tty_mode_ioctl
The only user of 'file' parameter in tty_mode_ioctl is a BUG_ON check. Provided it never crashed for anyone, it's an overkill to pass the parameter to tty_mode_ioctl only for this check. If we wanted to check 'file' there, we should handle it in more graceful way anyway. Not by a BUG == crash. Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: Marc Kleine-Budde <mkl@pengutronix.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Andreas Koensgen <ajk@comnets.uni-bremen.de> Cc: Paul Mackerras <paulus@samba.org> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20210914091134.17426-5-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/can/slcan.c')
-rw-r--r--drivers/net/can/slcan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c
index 012da4b8abe0..9a4ebda30510 100644
--- a/drivers/net/can/slcan.c
+++ b/drivers/net/can/slcan.c
@@ -691,7 +691,7 @@ static int slcan_ioctl(struct tty_struct *tty, struct file *file,
return -EINVAL;
default:
- return tty_mode_ioctl(tty, file, cmd, arg);
+ return tty_mode_ioctl(tty, cmd, arg);
}
}