summaryrefslogtreecommitdiff
path: root/drivers/tty/rocket.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2016-11-08 15:24:54 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-10 16:41:25 +0300
commit7a3f09846c978e613979d89f99b633b501f202a2 (patch)
tree35f5f17e109ef5a97ed008bf269127f2175f47d1 /drivers/tty/rocket.c
parent6f8ada1292904c8299daa019634b3cddcf2a31c3 (diff)
downloadlinux-7a3f09846c978e613979d89f99b633b501f202a2.tar.xz
tty: rocket: fix invalid user-pointer checks
Drop invalid user-pointer checks from custom ioctl handlers. A NULL-pointer can be valid in user space and copy_to_user() takes care of sanity checking. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/rocket.c')
-rw-r--r--drivers/tty/rocket.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c
index b0cc47c77b40..d66c1edd9892 100644
--- a/drivers/tty/rocket.c
+++ b/drivers/tty/rocket.c
@@ -1189,8 +1189,6 @@ static int get_config(struct r_port *info, struct rocket_config __user *retinfo)
{
struct rocket_config tmp;
- if (!retinfo)
- return -EFAULT;
memset(&tmp, 0, sizeof (tmp));
mutex_lock(&info->port.mutex);
tmp.line = info->line;
@@ -1255,8 +1253,6 @@ static int get_ports(struct r_port *info, struct rocket_ports __user *retports)
struct rocket_ports tmp;
int board;
- if (!retports)
- return -EFAULT;
memset(&tmp, 0, sizeof (tmp));
tmp.tty_major = rocket_driver->major;