From: zhengbin Date: Mon, 8 Jul 2019 12:42:18 +0000 (+0800) Subject: auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4455bacd144e5df9ffc7f4c5874310f92f355b31;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach [ Upstream commit b33d567560c1aadf3033290d74d4fd67af47aa61 ] 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 Signed-off-by: zhengbin Signed-off-by: Miguel Ojeda Signed-off-by: Sasha Levin --- diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c index 6911acd896d9..e30953ceb7df 100644 --- a/drivers/auxdisplay/panel.c +++ b/drivers/auxdisplay/panel.c @@ -1622,6 +1622,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: