]> git.baikalelectronics.ru Git - kernel.git/commit
serial: liteuart: Fix NULL pointer dereference in ->remove()
authorIlia Sergachev <silia@ethz.ch>
Mon, 15 Nov 2021 21:49:44 +0000 (22:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Nov 2021 17:25:24 +0000 (18:25 +0100)
commitb66c6a23d878b0c4d2db51a0f7fa99beb0c1077a
tree5760212d8a5eef5634ad46964936da56f8fece77
parentb36332f13ad005f20a0ac2c470789aeadcee8ed2
serial: liteuart: Fix NULL pointer dereference in ->remove()

drvdata has to be set in _probe() - otherwise platform_get_drvdata()
causes null pointer dereference BUG in _remove().

Fixes: cbd367a3959b ("drivers/tty/serial: add LiteUART driver")
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Ilia Sergachev <silia@ethz.ch>
Link: https://lore.kernel.org/r/20211115224944.23f8c12b@dtkw
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/liteuart.c