]> git.karo-electronics.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>
Fri, 23 May 2014 09:33:55 +0000 (10:33 +0100)
commit6b3d974636623c309fc5d7f7b5633d23503a68b4
tree16a155bb8e8a6418e9e9045c87d51f6e3372fbdf
parent97fa9286c89ccc408bf2403793cc35e3771b9071
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