From patchwork Wed Oct 19 08:27:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4706 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp213773wrs; Wed, 19 Oct 2022 02:11:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4yRdd7NYtG+C7WBLp4HUJm5PSaaz/N98ZDKzE+jIdSxqNyYMoLzRu1y4lRQFlTXEeT2xUz X-Received: by 2002:a17:907:1dd8:b0:78d:cbdc:ff1f with SMTP id og24-20020a1709071dd800b0078dcbdcff1fmr5774498ejc.412.1666170662042; Wed, 19 Oct 2022 02:11:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170662; cv=none; d=google.com; s=arc-20160816; b=zyyyU7Y02ExGTEmZU6+nBBPwwD91v7fYSsNVpo6TDz0rOAKMEcEdng6ePBYfGTFoJs YUoZ130O6AJVWhDi9EBqSA39PVMx2ZQYci+GUd7bEZeTIIHjaWHWJnNhPOIIevG1MUUj yU8AchhaP531Y9Bi07n8YQIkFsOFPKunbOwEb1yzMfMnBehBt/k6JeOC148TmP95nmqS IOFF/KatYA0TzaaiCd/efiQcoSAQt8q9PVUs5YhmzcVC/oRnzMqLAWO1x3x5ZXjGmUHk n80RzLbm1j4TP1GifY88xeGYUiXC+CWtOz1TtQu17e1U8520Y3yIC/XubrUmoug1+vus yQ/Q== 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=nZyJQuxLUQ1HAP434t2fXQHFUcBLBItyPsXmzx4xu6x+fOuyxut9JgbY7QQHuMK/JK gsxERb6cgfjjtM07fSKNsHZpd4sKKGhEvoGT6nmNoUKYho77jZ/6DsYd5tK2B1F5HR4k cY7UfO+Cvq4M2tKRYlxyKdQgrsZwUVeXLhlHF56Kklt6pj/CR/srzXwb9JRoRqFlJpDO Z9ERwFNoRmObePzQbcpCk5nrUKQroZohcXbuFV8lRKbN1FjtsxNWly9msbFqMD6qb5qx t7GyKdNIqwMRheEnhJTyx3ODlcANz7DO95L+wDA2hYyb38j/CscAlyipK4/mu69LRvPE kEQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RQdfVOSn; 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 t22-20020a1709067c1600b0078a76811e33si11854798ejo.408.2022.10.19.02.10.37; Wed, 19 Oct 2022 02:11:02 -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=RQdfVOSn; 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 S232340AbiJSJGr (ORCPT + 99 others); Wed, 19 Oct 2022 05:06:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232660AbiJSJEu (ORCPT ); Wed, 19 Oct 2022 05:04:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17ED9AEA06; Wed, 19 Oct 2022 01:58: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 CDC96617FB; Wed, 19 Oct 2022 08:54:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2319C433D6; Wed, 19 Oct 2022 08:54:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169695; bh=LMiQSmINL+WpJ+Efxa9vMNxwvWoH4bT4QVIx9zBBdls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RQdfVOSnzluhIJDDdAQ9Yqh1293PKrci9G12Jp+mfA/lThUVOgHapc+pSXAw85/Hm cK092En9U4KXBwL78x9LX5DmGzf3YHKCGuLumVtVcdDT/hepHa/R9DV0U8t7C0flC4 n7h8lBhZYlYuCn2HavmFQoG9tUIM6RD5Jp/OPpqQ= 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 6.0 372/862] platform/x86: msi-laptop: Fix resource cleanup Date: Wed, 19 Oct 2022 10:27:39 +0200 Message-Id: <20221019083306.435244133@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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?1747106568052988451?= X-GMAIL-MSGID: =?utf-8?q?1747106568052988451?= 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);