From patchwork Mon Oct 24 11:29:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9173 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp457990wru; Mon, 24 Oct 2022 06:36:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6wVbIeBtKWkyr5B3WTHj0ZnQNPaQrbG90V5aw2CEwbkosJLXS4HLXySOXTT+p+1TvV8PVI X-Received: by 2002:a17:902:d4c5:b0:183:6e51:503 with SMTP id o5-20020a170902d4c500b001836e510503mr33305936plg.84.1666618611929; Mon, 24 Oct 2022 06:36:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666618611; cv=none; d=google.com; s=arc-20160816; b=zPjz0d04mXFGxbr0PInmOjuNcrWXj5+uq+sOh8tl23Wf7po7cimvwfNJcQxh+J1Ki5 mEzGNPnC3zT2yHffKepjldWLtgklZJamAw7W2hSvMZ1hjfZ+ml4ckEtGZTJHJ/H8IABb KE7fbb9QnltWy/jyTg6lGiA8k8XpeLuKtkyx6LnvEjX1MsTdolS5xm8VKd9A0n/5kiMU uMX0S0Qg9XA9A2B/t1NjK8whlBdWKjIprqGYasDjGr8tGsN0TkbZclEv9y+NlCbNN1IA i4Ik9u0Q2EocwwdbZf4F3+2y+3vd95oR14cbLl05Yo5AjGYa3m3rQMUEgO072CUBjdHa wOfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vrHf8FVIz3ooUssgsspeBESZGqBVJvKQiAbgpLMHoOQ=; b=IM6vXPKpRXIDbDYQ42plyJv6tpN1g355eT/9loN3iofmHb2jf4zEAFDGALoCMjfPNQ 1L9EIEzPnYkSmB0taSzfUUHnN1f42GiN9PCOthmrlCE8VetUmeQePZPncdGVZCKK0Ei/ 4uzjFCMJEUJAk05n1m5ga/zIMa2jJPFn+4MGBrcs+Wru3Sjm+0Aqp5G15Q8NFn6tD2zi 7GyZ2zB7h9VBAyfXL4OdrrApQL4KWR7vm4HAhU7MbpA7VIxEIsZd8/7coosnKLdP3l4J hiHyFeh6lJuV6ccB6rLfJI3pWdcQyKEJpqMzAsl4Lr1z2hvRwct9lTb3SkvrZfIwSm/L meOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Y8pTGWGR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k38-20020a634b66000000b00439befcd2b7si34994685pgl.725.2022.10.24.06.36.15; Mon, 24 Oct 2022 06:36:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Y8pTGWGR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230164AbiJXNPp (ORCPT + 99 others); Mon, 24 Oct 2022 09:15:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235899AbiJXNOG (ORCPT ); Mon, 24 Oct 2022 09:14:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74D4F3FA2C; Mon, 24 Oct 2022 05:25:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 02379612BF; Mon, 24 Oct 2022 12:24:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14C8DC433C1; Mon, 24 Oct 2022 12:24:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614242; bh=LMiQSmINL+WpJ+Efxa9vMNxwvWoH4bT4QVIx9zBBdls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y8pTGWGRtzIYLpeBzsxfYjVe5/GDGyj8HjomMECYcgbwlWszYKxImav5XioEwNER2 UgYpNq+ZccGLIJ8bN9zsbMqf2FzT4+w63QBlpF7vohAca2v5sm8yhAA3x2mT0bazQl PIOm2AowlniCnQX61gtC0Mzz1JWWqBcIlSwIFDDA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , Sasha Levin Subject: [PATCH 5.10 153/390] platform/x86: msi-laptop: Fix resource cleanup Date: Mon, 24 Oct 2022 13:29:10 +0200 Message-Id: <20221024113029.193870351@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747576277590884918?= X-GMAIL-MSGID: =?utf-8?q?1747576277590884918?= From: Hans de Goede [ Upstream commit 5523632aa10f906dfe2eb714ee748590dc7fc6b1 ] Fix the input-device not getting free-ed on probe-errors and fix the msi_touchpad_dwork not getting cancelled on neither probe-errors nor on remove. Fixes: 143a4c0284dc ("msi-laptop: send out touchpad on/off key") Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20220825141336.208597-3-hdegoede@redhat.com Signed-off-by: Sasha Levin --- drivers/platform/x86/msi-laptop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c index 0960205ee49f..3e935303b143 100644 --- a/drivers/platform/x86/msi-laptop.c +++ b/drivers/platform/x86/msi-laptop.c @@ -1116,6 +1116,8 @@ static int __init msi_init(void) fail_create_group: if (quirks->load_scm_model) { i8042_remove_filter(msi_laptop_i8042_filter); + cancel_delayed_work_sync(&msi_touchpad_dwork); + input_unregister_device(msi_laptop_input_dev); cancel_delayed_work_sync(&msi_rfkill_dwork); cancel_work_sync(&msi_rfkill_work); rfkill_cleanup(); @@ -1136,6 +1138,7 @@ static void __exit msi_cleanup(void) { if (quirks->load_scm_model) { i8042_remove_filter(msi_laptop_i8042_filter); + cancel_delayed_work_sync(&msi_touchpad_dwork); input_unregister_device(msi_laptop_input_dev); cancel_delayed_work_sync(&msi_rfkill_dwork); cancel_work_sync(&msi_rfkill_work);