From patchwork Mon Oct 24 11:30:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8716 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp423458wru; Mon, 24 Oct 2022 05:25:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6dzzhgXm3KhS1ujMdT9YMGj+7cPs6J1iLPAyP6xzTeCbQL3Q1Twb6bTNmcbLB9Sx4TXErv X-Received: by 2002:a17:90b:1d08:b0:212:de5d:e9e5 with SMTP id on8-20020a17090b1d0800b00212de5de9e5mr14914764pjb.239.1666614300320; Mon, 24 Oct 2022 05:25:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666614300; cv=none; d=google.com; s=arc-20160816; b=KCWCCLOuBDWiBAA7pUhNcy/uI/pLzlwU4c3PGHlOVl3aM02JNaTx1lbeago3yQ4vAb m+M+auqqNI8Hfh5wjZtJVlyKpC/aGgEFm5Wp8+IPZ4TnxzpOsz75jz3DZy09/bDUDq3b TixLi/Ov377MG0YhxEommiD8F+FQT/xSBqafpxNFXrRrpqSutqB0sLEaEb/hMvMAEg3F B8s9mMJu2x5cveNyOQ9VUIaZaKMwcWU16Xkt2iZNueoJV9rter/RaMeYCMG4netE9OjQ XoaBn3vBqeUK1HI0ph6o01kwYHdw577bfwC6L0BEyvhCGBPiNp0b2V0y8298dcaa+HRX 8rlA== 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=ReqmkBiLT9nj1/NEl8rl8sQNmaUIGHG6NWhdHtHMQIE=; b=ECGN9TMdip3pXRXq4jNaI0C4ZORDw3mXsX86uYJfJAD8W08EREnfaB6cfZFNW1lCN2 5lKyQIVmggh50/yqDi2LBjqDmvPpPmXIJgVsCjrRN2A1qGYxghoa9z8cxf1lsFw9MQYA R1oIQ9SHbqDHSTzWsYYHEpMjJs1FwqbeAVKSzTMIGNbW8YoUn+HcksXrSMkbonUt1Ll/ j0HrR/bFi8ez47ZomYoV80jeZYu2XXOl2TekXwQcPMSRf5vxwn6V5PZrc6U18/+QgWUf uM2ZuVYUzTIUYqHLKHIvj5QUWor+bZEI+//ryPEaBzGogk4r263bunxzJyTqN/B3X9dR EPyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RibFMv8Q; 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 h13-20020a170902f54d00b00179f3da346bsi39628801plf.39.2022.10.24.05.24.46; Mon, 24 Oct 2022 05:25:00 -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=RibFMv8Q; 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 S233539AbiJXMXl (ORCPT + 99 others); Mon, 24 Oct 2022 08:23:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233517AbiJXMWh (ORCPT ); Mon, 24 Oct 2022 08:22:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28ACAA447; Mon, 24 Oct 2022 04:59:24 -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 AC7686127C; Mon, 24 Oct 2022 11:58:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFA70C433C1; Mon, 24 Oct 2022 11:58:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612730; bh=xK4TJAnvmIYn/27eY3hx0LNJJauXMyCiuXPB+sk2Bhk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RibFMv8QUds1gkZNQv+NqisbKHgSqIrQC6zNNpEiOmNQD7zOylUaw7tMmNLCdcQxh mt3GmMNw35caGhP0xgFEa3ESaemwR/ED9vEfVALCLPKfkDOyznTmIPKpwbvlr6Mn+o CKzu+ywk1AhJTyTdaSDUE3P/0R3A9L8Chyj+m2+Q= 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 4.19 098/229] platform/x86: msi-laptop: Fix resource cleanup Date: Mon, 24 Oct 2022 13:30:17 +0200 Message-Id: <20221024113002.205914876@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112959.085534368@linuxfoundation.org> References: <20221024112959.085534368@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=unavailable 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?1747571756540904134?= X-GMAIL-MSGID: =?utf-8?q?1747571756540904134?= 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 7279390a2d54..1ba5f4689df4 100644 --- a/drivers/platform/x86/msi-laptop.c +++ b/drivers/platform/x86/msi-laptop.c @@ -1129,6 +1129,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(); @@ -1149,6 +1151,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);