From patchwork Mon Oct 24 11:29:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9740 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp548609wru; Mon, 24 Oct 2022 09:42:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM49mMOjWVrJsiGVHIwBk8I8uxeVQ9Pd8jZa/DxkZ6b76ZUuPxBXrRM1+RJNEaBRImcEUVom X-Received: by 2002:a17:902:8601:b0:181:6c26:110d with SMTP id f1-20020a170902860100b001816c26110dmr33367249plo.27.1666629720272; Mon, 24 Oct 2022 09:42:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666629720; cv=none; d=google.com; s=arc-20160816; b=J1OfBKKBRYNnkheeMLj5DHPdBtmW6NAORRP5V2OKNJB+Cdq0Q9kX3KR+Rdv0KQN9JC oFtUEda69EX3cTJJz0SaZoLv6YasAW1CCxlEbjTGbigW0fLg25+uiung9hfgP/1TFnXW kl2uCpwheIWvMNbHKLPjKXRuf5v34I4bQIxy5CeJVmQGnyOryIrTXppro9kXhHU6/mk3 p9AjYToKv1j/fk8Egbupa4DeGIvkD5p0hT/JvwyXxGnBmsEvHLeoQwLrbwOGHNzIjL+T bDwOeEv1L7SWRd8yMXAy9vhiWOMuBrEBjgY5uFCmlMfZgPufnKxOqRsGlwYnqa5qBa6d DeCw== 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=Wi8O/KJ9fhcAsuvaN9WJnIKA/XHUhwq86WnqPlltbV+iLk7L6EoxSXMth+NVl6rs1K FBhmMvDLLzGEUCCSuWYNf2Y6BULxeho2YzCM9tnDiRSjLHMATBdTZuy4vX9V8wtP8TqE 1IzRuGQihSwjOv9iFcB23YvxRzscU64z2ANjDJV0QKN4SxKKqH2doegoBvXRHCK1Xidh wCLehZsEaEmxcFOMcW0EAMxHbXgvf4oCvXjdjVR1iJ4RKRyUit3bc4g/gZzde6SJmve8 CJBT2x3nObsMPrEJb9Al7/d+I781oGcILF7fKhf/vb4YuYfTfk88p2dioeqpZ5FXR1Zp 06OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=r0wdbdZG; 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 i184-20020a6387c1000000b0046ec91a400asi10720798pge.70.2022.10.24.09.41.47; Mon, 24 Oct 2022 09:42: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=r0wdbdZG; 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 S232336AbiJXQlO (ORCPT + 99 others); Mon, 24 Oct 2022 12:41:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234409AbiJXQkn (ORCPT ); Mon, 24 Oct 2022 12:40:43 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC4B417D2B9; Mon, 24 Oct 2022 08:28:00 -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 B29D1B819A1; Mon, 24 Oct 2022 12:42:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1404FC433D7; Mon, 24 Oct 2022 12:42:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666615366; bh=LMiQSmINL+WpJ+Efxa9vMNxwvWoH4bT4QVIx9zBBdls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r0wdbdZGjjYDIyOK5jFyxg16xUbD63kxXyb+pCEsQMkd8qYsOY1EEt5HLpNmhFXKF 1wJeCZVgdshJboGBptVGV57gxYFEqMeLIodrUkboPYpn+j4PnN0jorXyh3s+ZjoNUX OqjGnnVAoHjGkz/IFVOWD5c1ZCYrUyeV6U6H2YL4= 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.15 223/530] platform/x86: msi-laptop: Fix resource cleanup Date: Mon, 24 Oct 2022 13:29:27 +0200 Message-Id: <20221024113055.188300528@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113044.976326639@linuxfoundation.org> References: <20221024113044.976326639@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?1747587925495157318?= X-GMAIL-MSGID: =?utf-8?q?1747587925495157318?= 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);