]> git.baikalelectronics.ru Git - kernel.git/commit
tty: amba-pl011: don't dereference NULL platform data
authorRobin Murphy <robin.murphy@arm.com>
Thu, 3 Mar 2016 16:35:35 +0000 (16:35 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Mar 2016 00:11:14 +0000 (16:11 -0800)
commit00b4e6c623666d1f82a5656f0eb6fe20dea8b973
tree93fb2a76912190cf0d8ac90bd3e4eedcdcde0f58
parentae5903d10f59853740075c172481e5154f064396
tty: amba-pl011: don't dereference NULL platform data

When only a TX DMA channel is specified in DT, pl011_dma_probe() falls
back to looking for the optional RX channel in platform data. What it
doesn't do is check whether that platform data actually exists...

Add the missing check to avoid crashing the kernel.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/amba-pl011.c