tty: serial: OMAP: Fix oops due to NULL pdata in DT boot
authorCousson, Benoit <b-cousson@ti.com>
Tue, 28 Feb 2012 17:22:12 +0000 (18:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Mar 2012 18:56:44 +0000 (10:56 -0800)
commita5f43138da9beddc46b00ec31d167143a7176683
tree077fe6f2ed1070ba9c82f268777553822d930074
parent079c9534a96da9a85a2a2f9715851050fbfbf749
tty: serial: OMAP: Fix oops due to NULL pdata in DT boot

The following commit: be4b0281956c5cae4f63f31f11d07625a6988766
(tty: serial: OMAP: block idle while the UART is transferring data in PIO mode),
is introducing an oops if OMAP is booted using device tree blob because
the pdata will not be initialized.

Check if pdata is set before de-referencing it.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Reviewed-by: Paul Walmsley <paul@pwsan.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/omap-serial.c