serial: imx: fix NULL dereference Oops when pdata == NULL
authorBaruch Siach <baruch@tkos.co.il>
Tue, 22 Dec 2009 00:26:46 +0000 (16:26 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Mar 2010 16:06:27 +0000 (09:06 -0700)
commit401c1e931d0f19af9eb25a310e1aeb187d03526d
tree7c1347a6aa6c0ead8348cb444e3d30c3b4644c18
parentb31bb1d2ad9856e718b018012ae37a65a44894c9
serial: imx: fix NULL dereference Oops when pdata == NULL

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@tkos.co.il>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Oskar Schirmer <os@emlix.com>
Cc: Fabian Godehardt <fg@emlix.com>
Cc: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/serial/imx.c