]> git.ipfire.org Git - people/arne_f/kernel.git/commit
tty: atmel_serial: fix a potential NULL pointer dereference
authorKangjie Lu <kjlu@umn.edu>
Fri, 15 Mar 2019 17:16:06 +0000 (12:16 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2019 04:24:17 +0000 (06:24 +0200)
commitfe186fdd1a45b5e33dd85f7bf63e70049f99b230
tree1a0ce421673ad59c30bd7d02ba9496a77136531d
parent727b8577d543a9cff6f5ad39f9347ff267e33311
tty: atmel_serial: fix a potential NULL pointer dereference

commit c85be041065c0be8bc48eda4c45e0319caf1d0e5 upstream.

In case dmaengine_prep_dma_cyclic fails, the fix returns a proper
error code to avoid NULL pointer dereference.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Fixes: 34df42f59a60 ("serial: at91: add rx dma support")
Acked-by: Richard Genoud <richard.genoud@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/atmel_serial.c