Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1030996ybe; Wed, 4 Sep 2019 11:25:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6pAG1wR0q4YixxlMuqS1WYVH+qQ6Qh2FV2sCugdnfLpgqzMS2vNWTuvkVlwvntCsAVhJF X-Received: by 2002:a63:124a:: with SMTP id 10mr36035561pgs.254.1567621528335; Wed, 04 Sep 2019 11:25:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567621528; cv=none; d=google.com; s=arc-20160816; b=No7wN4lM/PM0P/Ou3L32dTgZPDRlvCFcmIaFItsphsHHsFUFdpHw8PJRBW/i2GdZ6M HDCq2TIBBky4BEcXZC6s6LAep6B2Cw3tMCV0JBBu/VOtCTfI7OZqLbP3gZXDJRxLIYKo JXqycrfVoOyi5AHzQA1jcXjjUfpyZCU1R4EO9xSpLqU9VTivFofiKC34ZtyfMXAXtW+I fgzZhJ1r92bVNHcS/4eeib0wBpcMJddOjVr5mcp4adRIT1dUD59A7mpy9yGrpK/UohNQ vz7QYwOQgwaolQbXm74swjXpv2vOcxV16sGtr0/UgrcS411EBNbvZz/9554yyczgOHav 4XEg== 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=uKZdbXkwoV5MM2BvEba3t1rQaPvUCagHbSkN+9dYOeA=; b=v3MylDpSFaHbIkbPkTa+NcL5W7tEOom70grDFsb/JyS8SYkNPsv0UhL0fTRZQeiObe UdDgJ2PMk+LeZgFd8V23zpn85pt2QrCQdmrk2xx+0/9HB5qx29lLRUGfWTvub3eT2xw/ ZGJ86u4DlC6u77MfSg++O70GaIaRhMcJruhafQbOgJAbi2zIv1i99opGli9UYMyMCtNm li1aBQoBMrvRuCtt72NipDqd9SFM7eX9J8G9iRgTSm1nWg2WfTJgPiCy5IS8e7DI+VVy A6ROj6VFwxfmfz1ZIN1dN7cZhpD2oH9Ht9kEVuAgOCQrVdsk1nFTdv6pa08RzlFIJuBr V3jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oh2sE8Bb; 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 r12si17401435pgv.574.2019.09.04.11.25.12; Wed, 04 Sep 2019 11:25:28 -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=oh2sE8Bb; 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 S2388860AbfIDSDD (ORCPT + 99 others); Wed, 4 Sep 2019 14:03:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:43248 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388852AbfIDSDA (ORCPT ); Wed, 4 Sep 2019 14:03:00 -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 35767206BA; Wed, 4 Sep 2019 18:02:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567620179; bh=OJzEaQbvwyMbi4SeJm0CcYQF9123gayrRcGt0F0drCY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oh2sE8Bb7dvyjwztvQU0cAFEfDCiZxZhqE0Z/2C5LE4FTz2W+rgM9doRGttwTTnum OGPpPBLayoo8fzsvSyk3jktln5TqHXCghnc5208TAex40SNFs49Wd//xv2iRSnWUEG EzlXIS6KgVmQsfYuXm0sTgCSBelNFU0u7mxD5cDI= 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 4.14 02/57] auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach Date: Wed, 4 Sep 2019 19:53:30 +0200 Message-Id: <20190904175302.204618800@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904175301.777414715@linuxfoundation.org> References: <20190904175301.777414715@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 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