From: Greg KH on
2.6.32-stable review patch. If anyone has any objections, please let me know.

From: Baruch Siach <baruch(a)>

commit bbcd18d1b37413d25eaf4580682b1b8e4a09ff5e upstream.

The platform code doesn't have to provide platform data to get sensible
default behaviour from the imx serial driver.

This patch does not handle NULL dereference in the IrDA case, which still
requires a valid platform data pointer (in imx_startup()/imx_shutdown()),
since I don't know whether there is a sensible default behaviour, or
should the operation just fail cleanly.

Signed-off-by: Baruch Siach <baruch(a)>
Cc: Baruch Siach <baruch(a)>
Cc: Alan Cox <alan(a)>
Cc: Sascha Hauer <s.hauer(a)>
Cc: Oskar Schirmer <os(a)>
Cc: Fabian Godehardt <fg(a)>
Cc: Daniel Glöckner <dg(a)>
Signed-off-by: Andrew Morton <akpm(a)>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)>

drivers/serial/imx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -1279,7 +1279,7 @@ static int serial_imx_probe(struct platf
sport->use_irda = 1;

- if (pdata->init) {
+ if (pdata && pdata->init) {
ret = pdata->init(pdev);
if (ret)
goto clkput;
@@ -1292,7 +1292,7 @@ static int serial_imx_probe(struct platf

return 0;
- if (pdata->exit)
+ if (pdata && pdata->exit)
@@ -1321,7 +1321,7 @@ static int serial_imx_remove(struct plat


- if (pdata->exit)
+ if (pdata && pdata->exit)


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)
More majordomo info at
Please read the FAQ at