]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit1a3c2d3e7c2a09f49d6f5dfc0ba2b7678c6dc2f1
treebb25f3d120570244d673ed3dbb29fbeddef38890
parentc17ed291921ded0f31cdfac6b73a73f6085afb20
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