diff options
author | Lee Jones <lee.jones@linaro.org> | 2013-05-09 13:50:55 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-20 11:54:55 -0700 |
commit | f6b6f52b583003ad443d5709c56b8858466c4268 (patch) | |
tree | 99097803171b86bfdb778d8616cd3fe8f2a1b3f5 /drivers/tty | |
parent | 383d2fc96c1983f5cd7fca3a3b1c9b8d8ee0de66 (diff) | |
download | kernel_goldelico_gta04-f6b6f52b583003ad443d5709c56b8858466c4268.zip kernel_goldelico_gta04-f6b6f52b583003ad443d5709c56b8858466c4268.tar.gz kernel_goldelico_gta04-f6b6f52b583003ad443d5709c56b8858466c4268.tar.bz2 |
serial: pl011: protect attribute read from NULL platform data struct
It's completely feasible that platform data will be empty i.e. when
booting with Device Tree with no device AUXDATA. So we must protect
it's use in these use-cases, or risk a kernel Oops.
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/amba-pl011.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 8ab70a6..e2774f9 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -332,7 +332,7 @@ static void pl011_dma_probe_initcall(struct device *dev, struct uart_amba_port * dmaengine_slave_config(chan, &rx_conf); uap->dmarx.chan = chan; - if (plat->dma_rx_poll_enable) { + if (plat && plat->dma_rx_poll_enable) { /* Set poll rate if specified. */ if (plat->dma_rx_poll_rate) { uap->dmarx.auto_poll_rate = false; |