]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mfd: mc13xxx-core: Initialize the lock prior to using it
authorFabio Estevam <fabio.estevam@freescale.com>
Tue, 15 Apr 2014 22:56:14 +0000 (19:56 -0300)
committerLee Jones <lee.jones@linaro.org>
Tue, 3 Jun 2014 07:11:13 +0000 (08:11 +0100)
commit48ca9a52c58c088c7492185ef33d0675d6382b5a
tree69af6e3c4f6b083047339788b8d9b97d52f6a461
parentd09b711a31ed891dc372039ccd347cdc8402da04
mfd: mc13xxx-core: Initialize the lock prior to using it

After request_threaded_irq() is called there is a chance that an interrupt
may occur before the 'mc13xxx->lock' is initialized, which will trigger a kernel
oops.

In order to prevent that, move the initialization of 'mc13xxx->lock' prior to
requesting the interrupts.

Suggested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/mc13xxx-core.c