Skip to content
Commit a5a2b130 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman
Browse files

serial: core: fix potential NULL pointer dereference



The commit 761ed4a9 ("tty: serial_core: convert uart_close to use
tty_port_close") refactored uart_close() to use tty_port_close().  At the same
time it introduced a potential NULL pointer dereference. Rearrange the code to
avoid kernel crash.

Fixes: 761ed4a9 ("tty: serial_core: convert uart_close to use tty_port_close")
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0ae9fdef
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment