From 9b7affca1df4ca1232e86f99e533f75ce0f922cf Mon Sep 17 00:00:00 2001 From: wuwl10 Date: Mon, 18 Jan 2021 09:38:35 +0800 Subject: [PATCH] fpc1020: fix null pointer panic issue For multi fps sensor, if there was some unexprect INT signal comming during sensor being remove, IRQ handle will panic becase the sysfs kobj had ben free. Disable the irq to avoid this. Change-Id: I2144c6f803547c281830058b29438b9d71cd5933 Signed-off-by: wuwl10 Reviewed-on: https://gerrit.mot.com/1853153 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Hujun Liao Submit-Approved: Jira Key --- drivers/input/misc/fpc_fps_mmi/fpc1020_tee.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/misc/fpc_fps_mmi/fpc1020_tee.c b/drivers/input/misc/fpc_fps_mmi/fpc1020_tee.c index e1154c59ad3c..9269a7e258ea 100644 --- a/drivers/input/misc/fpc_fps_mmi/fpc1020_tee.c +++ b/drivers/input/misc/fpc_fps_mmi/fpc1020_tee.c @@ -426,6 +426,7 @@ static int fpc1020_remove(struct platform_device *pdev) { struct fpc1020_data *fpc1020 = dev_get_drvdata(&pdev->dev); + disable_irq(gpio_to_irq(fpc1020->irq_gpio)); #ifdef CONFIG_INPUT_MISC_FPC1020_SAVE_TO_CLASS_DEVICE fpc1020_create_sysfs(fpc1020, false); #else