[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190820134253.11562-3-sashal@kernel.org>
Date: Tue, 20 Aug 2019 09:42:44 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: zhengbin <zhengbin13@...wei.com>, Hulk Robot <hulkci@...wei.com>,
Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH AUTOSEL 4.14 03/12] auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach
From: zhengbin <zhengbin13@...wei.com>
[ 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 <hulkci@...wei.com>
Signed-off-by: zhengbin <zhengbin13@...wei.com>
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/auxdisplay/panel.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
index 6911acd896d93..e30953ceb7dfd 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:
--
2.20.1
Powered by blists - more mailing lists