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: 8599 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp419480wru; Mon, 24 Oct 2022 05:16:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4qJ8HQeOmkIhgyeA2x+hCQlIVwFpvVIt0DqX4UJ/5ONbkH5fJ7NbWlR1YXSC88Kzn7EQ+Y X-Received: by 2002:a05:6402:8cc:b0:45c:a5c9:c0a with SMTP id d12-20020a05640208cc00b0045ca5c90c0amr30377312edz.135.1666613782023; Mon, 24 Oct 2022 05:16:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666613782; cv=none; d=google.com; s=arc-20160816; b=Q25iirdAjmKDypME9+/eCAuBkBsgTn6Y8mk7rzss3gMdBFv40o/FqWO1bjqp/kyGpQ Yz/GfW8jiFgGCjl/zCnwAel7V21qRy+/HiJ6TGeCbFwtSJbHYaQQz8INA/aP1judBgaW K7+3Sh/rP1fM42MAkO24BZj2MYsm5imIGz0Hwl/sAiBb/zTledPhC6q/3mf4xxxNdE0h oFw02el5Sdl22ORP7YO71cWm2SBYuyyHkxl9bKSL6AKzW/j+8K5n3uqvMXKCM+tIgOQa qaWDpVQ6omUj1+kAIyk8ltQBHnox3N/CujpFcpRPXNOsu8fNPcCjFqQMnfCTbZsancAa nHkA== 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=kQhxi2fPoC7ESuBsU1rEB1aAIFI3R6ATJFHCVpJYDwbG4+rLTWkO600YejAkvE0ixs dCCYWiskWswYWqlvRyIGL/hzLH4/Ba8Umw0fVeHbuG5q1MwZAS5FLspe5AsXwG1ODnik TWWHu03ud1O58xsPGqTyHx3dCdUVZKCXxgQ0xTXuLwYLP+bmksvXqoYtCloB16jx3RgQ 9SoWFc5htK14DPLpwJK+39+6nuTAbwXhxHLULE+U5NLWTJ1yG9c3ijb3izcCxgKFi0Ab OSSCKOAnfdKRlOKNJ27owGGjUWaUcoMg/1IQml/nAipu7CateKGzUYKhzxN0/zJPJwh2 27HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QWXODkGg; 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 o3-20020a170906288300b0073d9c412570si22752448ejd.785.2022.10.24.05.15.56; Mon, 24 Oct 2022 05:16:22 -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=QWXODkGg; 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 S232763AbiJXMHv (ORCPT + 99 others); Mon, 24 Oct 2022 08:07:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233083AbiJXMFE (ORCPT ); Mon, 24 Oct 2022 08:05:04 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FF6D7CAA2; Mon, 24 Oct 2022 04:51:11 -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 ams.source.kernel.org (Postfix) with ESMTPS id 57F29B811C0; Mon, 24 Oct 2022 11:50:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACFB6C4314F; Mon, 24 Oct 2022 11:49:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612200; bh=xK4TJAnvmIYn/27eY3hx0LNJJauXMyCiuXPB+sk2Bhk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QWXODkGgUiFSeb+Od8xymSOu3+++Jn82mPzmDwGbp0YyFch9rctlRhk0K+VwMkPZK RBGZDTxR/v5SHcz+WzO/9It/mvCSMV5jwyRap4KcMQ4pNf2LLFcDhgSgavUa9IPmxB bKmmTf13slKtTUs/f4eCE2JxyQJK9DSUxsl+Uzt0= 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.14 100/210] platform/x86: msi-laptop: Fix resource cleanup Date: Mon, 24 Oct 2022 13:30:17 +0200 Message-Id: <20221024113000.267229182@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112956.797777597@linuxfoundation.org> References: <20221024112956.797777597@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?1747571213072785222?= X-GMAIL-MSGID: =?utf-8?q?1747571213072785222?= 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);