mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Lee Jones <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
383d2fc96c
commit
f6b6f52b58
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue