serial: 8250_omap: fix kernel crash in suspend-to-ram
authorSekhar Nori <nsekhar@ti.com>
Tue, 14 Jul 2015 08:02:03 +0000 (13:32 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jul 2015 22:24:11 +0000 (15:24 -0700)
commit727fd8ab7913421f3b60bcaaf31f1f5389c7cb5a
treebb25f3d120570244d673ed3dbb29fbeddef38890
parent29d58642f1a090ad574d14872b610b365b2d023b
serial: 8250_omap: fix kernel crash in suspend-to-ram

omap_device infrastructure has a suspend_noirq hook which
runtime suspends all devices late in the suspend cycle (see
_od_suspend_noirq() in arch/arm/mach-omap2/omap_device.c)

This leads to a NULL pointer exception in 8250_omap driver
since by the time omap8250_runtime_suspend() is called, 8250_dma
driver has already set rxchan to NULL via serial8250_release_dma().

Make an explicit check to see if rxchan is NULL in
runtime_{suspend|resume} hooks to fix this.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_omap.c
This page took 0.024486 seconds and 5 git commands to generate.