can: sja1000: fix {pre,post}_irq() handling and IRQ handler return value
authorOliver Hartkopp <socketcan@hartkopp.net>
Thu, 21 Nov 2013 17:03:07 +0000 (18:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Dec 2013 06:36:26 +0000 (22:36 -0800)
commitbd56b24db9050289af0b4b6e5bfecc3a9e2fb400
treee420b5e8993ce0a6ef4e4f67e5e00669851b4d12
parent120d92a8729d1bc2994fcc52b9bb183f47947f2c
can: sja1000: fix {pre,post}_irq() handling and IRQ handler return value

commit 2fea6cd303c0d0cd9067da31d873b6a6d5bd75e7 upstream.

This patch fixes the issue that the sja1000_interrupt() function may have
returned IRQ_NONE without processing the optional pre_irq() and post_irq()
function before. Further the irq processing counter 'n' is moved to the end of
the while statement to return correct IRQ_[NONE|HANDLED] values at error
conditions.

Reported-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/sja1000/sja1000.c