gpio: mpc8xxx: Prevent NULL pointer deref in demux handler
commit5edee64eb24b5eb8908324e3305ae46bbc7f1191
authorThomas Gleixner <tglx@linutronix.de>
Thu, 3 May 2012 10:22:06 +0000 (3 12:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Jun 2012 07:15:51 +0000 (1 15:15 +0800)
treeca9830a7ededb4d47863485cac8361a84b1c2ee0
parent4a460c43e3fa262f336957ab3eb3476b437c4791
gpio: mpc8xxx: Prevent NULL pointer deref in demux handler

commit d6de85e85edcc38c9edcde45a0a568818fcddc13 upstream.

commit cfadd838(powerpc/8xxx: Fix interrupt handling in MPC8xxx GPIO
driver) added an unconditional call of chip->irq_eoi() to the demux
handler.

This leads to a NULL pointer derefernce on MPC512x platforms which use
this driver as well.

Make it conditional.

Reported-by: Thomas Wucher <thwucher@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Felix Radensky <felix@embedded-sol.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpio-mpc8xxx.c