summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/efm32-uart.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2017-04-11 20:07:29 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-18 17:41:49 +0300
commitaee5da7838787f8ed47f825dbe09e2812acdf97b (patch)
tree993f2865f8971801be62985ee3b4fa8dd729bfaa /drivers/tty/serial/efm32-uart.c
parentd3ba126a226a6b6da021ebfea444a2a807cde945 (diff)
downloadlinux-aee5da7838787f8ed47f825dbe09e2812acdf97b.tar.xz
serdev: fix tty-port client deregistration
The port client data must be set when registering the serdev controller or client deregistration will fail (and the serdev devices are left registered and allocated) if the port was never opened in between. Make sure to clear the port client data on any probe errors to avoid a use-after-free when the client is later deregistered unconditionally (e.g. in a tty-port deregistration helper). Also move port client operation initialisation to registration. Note that the client ops must be restored on failed probe. Fixes: bed35c6dfa6a ("serdev: add a tty port controller driver") Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Rob Herring <robh@kernel.org> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/efm32-uart.c')
0 files changed, 0 insertions, 0 deletions