summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/uart.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2016-11-08 13:31:18 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-10 14:04:12 +0100
commit4dfc109c7118ed8e2806c5395b9e9dd8f851f992 (patch)
tree02fbadb49d1876427609d871e70f72eddf6a9e58 /drivers/staging/greybus/uart.c
parent52d0744d751d8f13511df15e776460bfb95bcf5c (diff)
staging: greybus: uart: fix invalid user-pointer check
Drop invalid user-pointer check from TIOCGSERIAL handler. 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> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/greybus/uart.c')
-rw-r--r--drivers/staging/greybus/uart.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
index c1f6abb57dc3..35755f70d5a2 100644
--- a/drivers/staging/greybus/uart.c
+++ b/drivers/staging/greybus/uart.c
@@ -623,9 +623,6 @@ static int get_serial_info(struct gb_tty *gb_tty,
{
struct serial_struct tmp;
- if (!info)
- return -EINVAL;
-
memset(&tmp, 0, sizeof(tmp));
tmp.flags = ASYNC_LOW_LATENCY | ASYNC_SKIP_TEST;
tmp.type = PORT_16550A;