]> git.baikalelectronics.ru Git - kernel.git/commit
Input: snvs_pwrkey - initialize necessary driver data before enabling IRQ
authorAnson Huang <anson.huang@nxp.com>
Wed, 3 Apr 2019 22:14:44 +0000 (15:14 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 3 Apr 2019 23:10:57 +0000 (16:10 -0700)
commitc3c742f3ecc1e9f11e2c3cae6a1a0bff7a5c74ce
treea8115e33a4c7b44725cf1fc2150d968a828d2b42
parentfb876fcae5e48e6c2bcfa90122fda9b1baecf2f5
Input: snvs_pwrkey - initialize necessary driver data before enabling IRQ

SNVS IRQ is requested before necessary driver data initialized,
if there is a pending IRQ during driver probe phase, kernel
NULL pointer panic will occur in IRQ handler. To avoid such
scenario, just initialize necessary driver data before enabling
IRQ. This patch is inspired by NXP's internal kernel tree.

Fixes: a722951ee374 ("input: keyboard: imx: add snvs power key driver")
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/snvs_pwrkey.c