mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Pavel Kossenko (kotekompotek)" <kotekompotek@gmail.com>
To: "Corentin Chary" <corentin.chary@gmail.com>,
	"Luke D . Jones" <luke@ljones.dev>,
	"Denis Benato" <denis.benato@linux.dev>,
	"Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Pavel Kossenko (kotekompotek)" <kotekompotek@gmail.com>
Subject: [PATCH 1/2] platform/x86: asus-laptop: Unregister the wimax rfkill on exit
Date: Sun, 11 Oct 2026 00:38:36 +0500	[thread overview]
Message-ID: <20261010193837.1120-2-kotekompotek@gmail.com> (raw)
In-Reply-To: <20261010193837.1120-1-kotekompotek@gmail.com>

asus_rfkill_init() registers an "asus-wimax" rfkill switch on machines
that implement WM_RSTS, but asus_rfkill_exit() never unregisters it.
The rfkill device is leaked when the driver is removed, and also when
probe fails after asus_rfkill_init() has succeeded.

Add the missing asus_rfkill_terminate() call. It is a no-op when the
switch was never registered.

Fixes: 3c8671ffd334 ("asus-laptop: add rfkill interfaces for wlan and wwan")
Assisted-by: Claude Opus 5.5
Signed-off-by: Pavel Kossenko (kotekompotek) <kotekompotek@gmail.com>
---
 drivers/platform/x86/asus-laptop.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index de607ed..8e69f02 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -1332,6 +1332,7 @@ static void asus_rfkill_terminate(struct asus_rfkill *rfk)
 
 static void asus_rfkill_exit(struct asus_laptop *asus)
 {
+	asus_rfkill_terminate(&asus->wimax);
 	asus_rfkill_terminate(&asus->wwan);
 	asus_rfkill_terminate(&asus->bluetooth);
 	asus_rfkill_terminate(&asus->wlan);
-- 
2.47.0.windows.2


  reply	other threads:[~2026-10-10 19:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-10 19:38 [PATCH 0/2] platform/x86: asus-laptop: Fix Wi-Fi hard RF-kill on Pegatron Lucid Pavel Kossenko (kotekompotek)
2026-10-10 19:38 ` Pavel Kossenko (kotekompotek) [this message]
2026-10-10 19:38 ` [PATCH 2/2] platform/x86: asus-laptop: Add WiMAX rfkill switch for " Pavel Kossenko (kotekompotek)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261010193837.1120-2-kotekompotek@gmail.com \
    --to=kotekompotek@gmail.com \
    --cc=corentin.chary@gmail.com \
    --cc=denis.benato@linux.dev \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luke@ljones.dev \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®