Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp809414rwi; Wed, 19 Oct 2022 03:17:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM77SIccxYp0IsNmk2iHuVB0uNOdj9bHMz6z/1HIwibpMcOWvs+QzrJ1ywbufeayoHd+fcJl X-Received: by 2002:a17:907:7e9e:b0:78d:f3b0:fc78 with SMTP id qb30-20020a1709077e9e00b0078df3b0fc78mr6130432ejc.478.1666174660686; Wed, 19 Oct 2022 03:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666174660; cv=none; d=google.com; s=arc-20160816; b=by4gN6Z9+QlJ0tM3XIYnYRTqVAToU01xUt+xHKYou3R3qmYEkFdPwcsAztFSPkZY9r HbWXkGi1q6ZLE8fggkWzAtGOgNipf0tnRVJZ2aq5w2aAFOOO2CRzk5GO3Dk1GS58/hFi Vi8+btsnpUF3FSgdHs5scF6E/UJvHOBCy8N8/32EEwoaoZ68r46Nm9r1ksFg9wzFmW3A dvTWwTHQccNh+DfFlKEAlhcq8YKKOXBpRJT7Jd7xVxoWav0KOUm3djEy9lYtgPJEvO82 gFHwNuUKfW+QfQpfpA+UEQnY37KdgDKFYZg3w06IPg6eP/DoqOHnAVEqeQkutCDzIjwf LGtA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s17-20020aa7c551000000b0045c9dbe290csi12517535edr.406.2022.10.19.03.17.14; Wed, 19 Oct 2022 03:17:40 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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); -- 2.35.1