From patchwork Sat Oct 22 07:23:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7409 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1097429wrr; Sat, 22 Oct 2022 01:07:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7LKWDSejnVh0bt2iI0JrXbYPUafJdmz+wB5PyESXN1zaZy0gNB9reLpMGJ3FsErQPPHnq0 X-Received: by 2002:a63:f91e:0:b0:456:ccc4:85c2 with SMTP id h30-20020a63f91e000000b00456ccc485c2mr19283551pgi.624.1666426063547; Sat, 22 Oct 2022 01:07:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666426063; cv=none; d=google.com; s=arc-20160816; b=RU+OdgtS049AfV/nRWDh/tivxrr/dy/3AtgRNH9OAfwlIB3KILApKJPJjgu+vho0gi +OYICHTwm72f2D7c/P5Wuchdzo7cRGfgPs4JisUO2o4pkXIr5vfO5f7WZX/KAIWMjScb sZkiHh+sajWhit4Ub8wfRmc/ESMwHaskiYKfLwOGLtyjLHo/7Zhe455vrQvMut+fmea1 iVt9+IBSjhnp2ZHVIRDeLem+U0ACV8/dz5D9MPCVCK/HWzo2GtQhehMLo/D+mt6AGxTm SR/oVSoj9dD0QbKTwjGvq1QxqB4VTkj/pmCnh4umYZMtlbORX7cJOyhrdrLVA8FeD/59 tD/w== 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=Gnl/6lB40abqTmRrEVutFUhGttnEBRKxyVacGjoUB4++fTg63WfNiQYW49XU3oCWo4 FzMZO5iIrPmNpSUVAnbxqXIfaDO/lrfkL+aiC3gK9kmSjWZe5JFJfLZTy1cLTYFNywTE mFGsU98jGcjHM510HOHRJXzoF1I78TD3xbiYBZtOmThVLrAviUldWm/s/QOCrOesMoet CIz49xX0IGOoC/IZiOKDuZ0mIprFndnef7iUOnp/m/HFIYz4dyeoYV96OQoL5i2AitrR gITEs79JWwR/ot9pN1Nv1rttH4Y2uy0gvmgq+0g6WzhkkKuM8XdeczYfvpzi5Pzw8L8/ RqDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jd3jQsQ6; 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 9-20020a631849000000b0045f83471400si28451780pgy.328.2022.10.22.01.07.30; Sat, 22 Oct 2022 01:07:43 -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=jd3jQsQ6; 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 S232887AbiJVIGw (ORCPT + 99 others); Sat, 22 Oct 2022 04:06:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232950AbiJVIA0 (ORCPT ); Sat, 22 Oct 2022 04:00:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D72EE2681F0; Sat, 22 Oct 2022 00:50:33 -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 D554D60AD7; Sat, 22 Oct 2022 07:48:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7F11C433D6; Sat, 22 Oct 2022 07:48:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424892; bh=LMiQSmINL+WpJ+Efxa9vMNxwvWoH4bT4QVIx9zBBdls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jd3jQsQ6jGifMreDjrFoO5KQV/8IThSbSOS8f+86frtV9BKIkMruUi8VmPl8F+CGF vVHWPy/FoMD6j8Yt9BwQrwkotm2bbFTugcJF89SyYtg2xTh2aHcMCyH03OTUyEDeAF R6JwcVffEwyTXyZE9ctJ8nfRXVBn6KTo9umdW3NA= 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.19 315/717] platform/x86: msi-laptop: Fix resource cleanup Date: Sat, 22 Oct 2022 09:23:14 +0200 Message-Id: <20221022072507.941071274@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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?1747374375895619460?= X-GMAIL-MSGID: =?utf-8?q?1747374375895619460?= 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);