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 <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1853153
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
wuwl10 2021-01-18 09:38:35 +08:00 • committed by Weilong Wu
commit 9b7affca1d

View file

@ -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