Lanqing Liu efc176929a serial: sprd: Fix a dereference warning
We should validate if the 'sup' is NULL or not before freeing DMA
memory, to fix below warning.

"drivers/tty/serial/sprd_serial.c:1141 sprd_remove()
 error: we previously assumed 'sup' could be null (see line 1132)"

Fixes: f4487db58eb7 ("serial: sprd: Add DMA mode support")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lanqing Liu <liuhhome@gmail.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/e2bd92691538e95b04a2c2a728f3292e1617018f.1584325957.git.liuhhome@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-17 15:20:41 +01:00
..
2019-12-03 14:09:14 -08:00
2019-11-13 19:01:14 +08:00
2019-04-16 15:21:34 +02:00
2017-11-28 15:32:33 +01:00
2018-10-13 00:50:32 -04:00
2020-02-19 12:46:48 +01:00
2017-11-08 13:08:12 +01:00
2019-09-04 12:43:44 +02:00
2019-11-04 17:42:28 +01:00
2019-04-16 15:21:34 +02:00