]> git.baikalelectronics.ru Git - kernel.git/commit
serial: mvebu-uart: Fix to avoid a potential NULL pointer dereference
authorAditya Pakki <pakki001@umn.edu>
Mon, 18 Mar 2019 23:50:56 +0000 (18:50 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Mar 2019 14:37:43 +0000 (15:37 +0100)
commit6aff16734314d5a851377eb7d5ed5235f26358e1
treea2a6f25a0593d18c9fd74466533e48d9f6dc5027
parente34ba0d7c8ee128a8a7cc0a1d0345206aeb6a4e5
serial: mvebu-uart: Fix to avoid a potential NULL pointer dereference

of_match_device on failure to find a matching device can return a NULL
pointer. The patch checks for such a scenrio and passes the error upstream.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/mvebu-uart.c