Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6883067ybi; Mon, 8 Jul 2019 10:10:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFNaOhfzMc1FMShsghPRC5D/INur01yMJTAhoqbwEQg0tk7DjbTKBbT0q9Wr2hzJzv1ZEj X-Received: by 2002:a63:1d0e:: with SMTP id d14mr15566637pgd.324.1562605827302; Mon, 08 Jul 2019 10:10:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562605827; cv=none; d=google.com; s=arc-20160816; b=ed3hNspcIl5Qf3N2ceCfoiQVtNqBDGTE4Tal/vqJPn09I1Ad1ncWphliugsEhtiqN5 DTYYbFwrAzB1Xp9o0tYN5pJri73u8GzaMlW6NIqCIr6xcel3x6REvJbWTDoqiEfkoAsU X37Umd2gEMXmiJ+sBf7xrTF+dVvA21dpFiT4e23Wab9fVOAghSj/48ez4c7CTQLkdkim qzZvuCZnvKYSMU4DSlnmlww+GzzVlpLHdGx+ejwQX355gurNjIOAaU8li1MM9tlCWBQr /OUO61kLNfmUYAONoUUBt0yKWFHbPse3Jbl6XDckRiUXeY2/IZw2/CO4QaovDlcrTWcV MJbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=LZNB+J6xJUsoKfgn3nfl59D3OehiowBEC/rwB53eDyM=; b=MRmfaKar8j1Nrgmu3aVN8shMtEIFvMMGgLhwBJRMpSkM0hziwLakonksHneofIKBCJ meknajKJLyJd9WvYhnZ9spF2HS9RCwKhKLCT2fMkzfbJPvGPbPf9wHnu8G+XxUSOUjbL wY5IASyE+z2izpaPGp2xi+NX5I0d/ENkDRQiCywNdl0YCACO14afsAZ/yXWPeM8NNLTX HaNnJI8w8znQmXb5XIb8MjLSh/yseg+2nRDMDllFNFFuz75pK/U7ovYtb+cs5Jh9mss2 d8H4rNJalSg0dTrTksOkHHxuqCuyIGAUpy8Ko8vflfrkUtSDT3kw8L+cq4Xi1dZMiy/O F6RA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2si18323019pgd.439.2019.07.08.10.10.11; Mon, 08 Jul 2019 10:10:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729581AbfGHMgo (ORCPT + 99 others); Mon, 8 Jul 2019 08:36:44 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:2237 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727544AbfGHMgo (ORCPT ); Mon, 8 Jul 2019 08:36:44 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 9F5538B1A157E02D993C; Mon, 8 Jul 2019 20:36:40 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Mon, 8 Jul 2019 20:36:32 +0800 From: zhengbin To: , , , CC: , Subject: [PATCH] auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach Date: Mon, 8 Jul 2019 20:42:18 +0800 Message-ID: <1562589738-10595-1-git-send-email-zhengbin13@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/auxdisplay/panel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c index e06de63..e6bd727 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: -- 2.7.4