summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhengbin <zhengbin13@huawei.com>2019-07-08 15:42:18 +0300
committerMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>2019-08-05 23:33:31 +0300
commitb33d567560c1aadf3033290d74d4fd67af47aa61 (patch)
tree6d349e0ed5b620c34f67c8578fa275fb03bf33c2
parente21a712a9685488f5ce80495b37b9fdbe96c230d (diff)
downloadlinux-b33d567560c1aadf3033290d74d4fd67af47aa61.tar.xz
auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach
In panel_attach, if misc_register fails, we need to delete scan_timer, which was setup in keypad_init->init_scan_timer. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: zhengbin <zhengbin13@huawei.com> Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
-rw-r--r--drivers/auxdisplay/panel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
index e06de63497cf..e6bd727da503 100644
--- a/drivers/auxdisplay/panel.c
+++ b/drivers/auxdisplay/panel.c
@@ -1617,6 +1617,8 @@ static void panel_attach(struct parport *port)
return;
err_lcd_unreg:
+ if (scan_timer.function)
+ del_timer_sync(&scan_timer);
if (lcd.enabled)
charlcd_unregister(lcd.charlcd);
err_unreg_device: