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. Cc: Mikael Starvik <starvik@xxxxxxxx> Cc: Jesper Nilsson <jesper.nilsson@xxxxxxxx> Cc: linux-cris-kernel@xxxxxxxx Signed-off-by: Johan Hovold <johan@xxxxxxxxxx> --- drivers/tty/serial/crisv10.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/tty/serial/crisv10.c b/drivers/tty/serial/crisv10.c index 315c84979b18..d4cb6ff52e7a 100644 --- a/drivers/tty/serial/crisv10.c +++ b/drivers/tty/serial/crisv10.c @@ -3214,8 +3214,6 @@ get_serial_info(struct e100_serial * info, * should set them to something else than 0. */ - if (!retinfo) - return -EFAULT; memset(&tmp, 0, sizeof(tmp)); tmp.type = info->type; tmp.line = info->line; -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html