powerpc/eeh: Check handle_eeh_events() return value
authorKleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Thu, 12 Jul 2012 17:14:36 +0000 (17:14 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 13 Jul 2012 03:37:17 +0000 (13:37 +1000)
commit10db8d212864cb6741df7d7fafda5ab6661f6f88
treead321c9ec8d250bf0c1d7a2cc61fec190b0e3be6
parent26b0d14106954ae46d2f4f7eec3481828a210f7d
powerpc/eeh: Check handle_eeh_events() return value

Function eeh_event_handler() dereferences the pointer returned by
handle_eeh_events() without checking, causing a crash if NULL was
returned, which is expected in some situations.

This patch fixes this bug by checking for the value returned by
handle_eeh_events() before dereferencing it.

Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: stable@vger.kernel.org [v3.4+]
arch/powerpc/platforms/pseries/eeh_event.c