From patchwork Mon Oct 24 11:30:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9145 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp457543wru; Mon, 24 Oct 2022 06:36:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5/uf9+71v1PgSkAYSdUY2wqjovZz+78paE6Bg035v5QEAxjTy7zmp4e441AZhGX0L8O5GI X-Received: by 2002:a17:907:8a1c:b0:78d:ef44:7759 with SMTP id sc28-20020a1709078a1c00b0078def447759mr28351507ejc.441.1666618569650; Mon, 24 Oct 2022 06:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666618569; cv=none; d=google.com; s=arc-20160816; b=nr/WdVStAB2zZ7Ri0B5dDHfHjNHUD5nADVC4a39wHOm0Wh9IKWCtHV+yhkKTAZPnKg j/BTqYSrPPmmObv1GlGC4KoT51UPNgaNXiXgGU+m7h44/tp4zyflJqUFxCcg3IZ5V3yo xZw73DtejMRShSruVvgJVV9uuF2vndOa8rB1Eqc+W9m1mYRTpUl0BuNljWA6wC67GfeK VjP9xphNu+EMVbLio7fHNhA5AOhnaAB4MBlqrpMlJ9AFeSLoaY7r4dWK11NLTAhBsSWs oqAGwmdJzzkhdopdbyqHzT1aDCM7rh9u2q2il1QRqp22dFCVhIQlhXy8wJVVG51AoU3n yXBA== 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=vMawnvniwQxu6wfr80VnaBdDxw/RBnpFJm47SwavRTZBjbRK7Zsf71ifak6r2YkzYU Gedlr/ceVbQG8F8pAf+PBvuhQRDdw/yQRBgyR/koF9uVhKCaQuciPqO5U6Cm1M+6qkTs yyduBqtMuDp4UFVcB4d3/iiK4UVp0yv1ynnKKmoDhh6sXRg3Nka1WML5lFOMYRDrIIwA TNhg5vIzCPpypabtCNlcUBcgf+j/dJmiMSo5phpmPQ5qQr8NqYkZFi82Uuk50NAQ/8cZ QVLVyxNPaLvuXBLIdSPnMW0q4qpZ3gRNjs6Z9o+TZZ7jiQz3TeFXYByaNDh7voFkwb36 zIWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2WdqA9pp; 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 gs17-20020a1709072d1100b0078d27c1b499si34905902ejc.500.2022.10.24.06.35.26; Mon, 24 Oct 2022 06:36:09 -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=2WdqA9pp; 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 S232659AbiJXNVb (ORCPT + 99 others); Mon, 24 Oct 2022 09:21:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236377AbiJXNUR (ORCPT ); Mon, 24 Oct 2022 09:20:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB72384E65; Mon, 24 Oct 2022 05:28:35 -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 B0B40B815AC; Mon, 24 Oct 2022 12:10:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11D41C433C1; Mon, 24 Oct 2022 12:10:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613403; bh=LMiQSmINL+WpJ+Efxa9vMNxwvWoH4bT4QVIx9zBBdls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2WdqA9ppt+2yCOZfja4F/sCCZ/fu3lcDyj6qC4WrcoYbk0+4KXRfQaXlS3AHHdTC5 HSOS6vYkWES/A8WtLMH0t9K9sgitwxYj4v6x/qADmhnY9F37xYuPxempTKYS5fmWfw sNNRWjYJd4lpyICEC5UHesZJijUkBXH6LZY0IOko= 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.4 093/255] platform/x86: msi-laptop: Fix resource cleanup Date: Mon, 24 Oct 2022 13:30:03 +0200 Message-Id: <20221024113005.585622506@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113002.471093005@linuxfoundation.org> References: <20221024113002.471093005@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?1747576233228700633?= X-GMAIL-MSGID: =?utf-8?q?1747576233228700633?= 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);