[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120419210612.047642263@linuxfoundation.org>
Date: Thu, 19 Apr 2012 14:06:22 -0700
From: Greg KH <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
alan@...rguk.ukuu.org.uk, Yuriy Kozlov <ykozlov@...usa.com>,
Tobias Klauser <tklauser@...tanz.ch>
Subject: [ 11/59] tty: serial: altera_uart: Check for NULL platform_data in probe.
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yuriy Kozlov <ykozlov@...usa.com>
commit acede70d6561f2d042d9dbb153d9a3469479c0ed upstream.
Follow altera_jtag_uart. This fixes a crash if there is a mistake in the DTS.
Signed-off-by: Yuriy Kozlov <ykozlov@...usa.com>
Signed-off-by: Tobias Klauser <tklauser@...tanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/tty/serial/altera_uart.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/tty/serial/altera_uart.c
+++ b/drivers/tty/serial/altera_uart.c
@@ -555,7 +555,7 @@ static int __devinit altera_uart_probe(s
res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res_mem)
port->mapbase = res_mem->start;
- else if (platp->mapbase)
+ else if (platp)
port->mapbase = platp->mapbase;
else
return -EINVAL;
@@ -563,7 +563,7 @@ static int __devinit altera_uart_probe(s
res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (res_irq)
port->irq = res_irq->start;
- else if (platp->irq)
+ else if (platp)
port->irq = platp->irq;
/* Check platform data first so we can override device node data */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists