diff options
author | zhengbin <zhengbin13@huawei.com> | 2019-07-08 20:42:18 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-06 10:21:56 +0200 |
commit | 377ebe613ed8fa55b19e6cc72d289f261e10a28d (patch) | |
tree | 0632a2a39c49e0c884545528361c3f3d29f1e894 /drivers | |
parent | 2f87eb895ebde8da302b5a52699a3ba45ccc27d5 (diff) | |
download | linux-stable-377ebe613ed8fa55b19e6cc72d289f261e10a28d.tar.gz linux-stable-377ebe613ed8fa55b19e6cc72d289f261e10a28d.tar.bz2 linux-stable-377ebe613ed8fa55b19e6cc72d289f261e10a28d.zip |
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 <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/auxdisplay/panel.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c index 3b25a643058c..0b8e2a7d6e93 100644 --- a/drivers/auxdisplay/panel.c +++ b/drivers/auxdisplay/panel.c @@ -1618,6 +1618,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: |