]> asedeno.scripts.mit.edu Git - linux.git/commit
tty: fix NULL pointer issue when tty_port ops is not set
authorFabien Dessenne <fabien.dessenne@st.com>
Thu, 21 Mar 2019 15:43:26 +0000 (16:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Mar 2019 16:21:21 +0000 (01:21 +0900)
commitf4e68d58cf2b20a581759bbc7228052534652673
tree04a5dc64b3a11f9f1a5c594e3725e627b6513713
parent3ec8002951ea173e24b466df1ea98c56b7920e63
tty: fix NULL pointer issue when tty_port ops is not set

Unlike 'client_ops' which is initialized to 'default_client_ops', the
port operations 'ops' may be left to NULL.
Check the 'ops' value before checking the 'ops->x' value.

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_port.c