Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1018575ybe; Wed, 4 Sep 2019 11:13:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyjXnvSP643TcUbMgMooilQdigtnk26d8xMcfhIFRud3LYSo1B4tTFP2m+by2fyMyXetckb X-Received: by 2002:a62:52d0:: with SMTP id g199mr31551131pfb.120.1567620798192; Wed, 04 Sep 2019 11:13:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567620798; cv=none; d=google.com; s=arc-20160816; b=0i0AJogsj54zlUotSew1m8P/zjHG/AvZ7F398RxIBeqyJRm1PGnixeX8j3IWaC6bS4 PFi0LLnO2aEmFoQAZss80/+5ixUx/YA40EWQBccjC0IDe+ZjAZmGt+cqYOmYa1N4YutB tItlyP+hdUT6LmNxcCf2XnAHIKDLh1yg28Vph2u0FSAZdNdY+tyMFxmAdhhtmLaY/qI8 vg5EMR2XflioDu/G/WhtuPzeVNdF8LKmRv0wBw9Ktb88/iun+FVYlmT87yqegG4hYsx5 f2t6c2XnlIyWnOwe7DWMqQJ8B+Ko0qmhP/F53aLeebkAzvL3x3xNlDdYyJeHYFJilFyA pY2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=L1zmJGf++o/vRSDQkdkBw9PC2+pZgSq0G9G85pQWzzE=; b=LuDboK7Fnb4aSrSuJW4lFHyxrAIrCbOLkP6/WbKTW78nb0riAByKpV3/fqtoTDhuDZ SnSIfJLBOsYOc8fn13rPFZL/t1Wr92EPXEAStkQr69G60W6o+JVRPNSEnrmSRwMkufof bJ/JbwYonkRUZ1CPYDPyi9qmzG34Ih/f+Sv/wuVC3cc3L74uNkb/+O06LXPaoQJO5hzX 65PBBjEKujWhaaOk47ml91fU9lmI962p74MBqAduMbCC37SO7dZlSFxw1GhvC1xoLOgP IvEoFG8EB9+7M+fQkEIkj4laW2fuHNqmNFEAYRuZu9gjccYmreEwdcifXiiisYMIM+8B r8Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LmQnNwzI; 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 j9si2868972pjz.23.2019.09.04.11.13.02; Wed, 04 Sep 2019 11:13:18 -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; dkim=pass header.i=@kernel.org header.s=default header.b=LmQnNwzI; 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 S2390320AbfIDSLh (ORCPT + 99 others); Wed, 4 Sep 2019 14:11:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:55642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390297AbfIDSLf (ORCPT ); Wed, 4 Sep 2019 14:11:35 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DA412208E4; Wed, 4 Sep 2019 18:11:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567620694; bh=6rtzguU+R9DHSfKFXDoJlFIzfSRNTmxvxakzRZsu3xM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LmQnNwzIkdYiOh9xHHO3HRKnLgQKhPG7ExOkcFTHwuvVj+LIS2XDj706ukSvdvsIJ FxVXFa4LOPMixpfTXo9yJ78HSvwLHm4AZrIwSLN00/tO7fzjGw1lgQ63nDtbk1S0Xw YbNDdFMqK9wQb3G04DgspV0l9g1aIlEjbYxWM14w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , zhengbin , Miguel Ojeda , Sasha Levin Subject: [PATCH 5.2 019/143] auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach Date: Wed, 4 Sep 2019 19:52:42 +0200 Message-Id: <20190904175314.826965196@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904175314.206239922@linuxfoundation.org> References: <20190904175314.206239922@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ 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 --- drivers/auxdisplay/panel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c index e06de63497cf8..e6bd727da503a 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.20.1