From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Rong Zhang <i@rong.moe>
Cc: "Derek J . Clark" <derekjohn.clark@gmail.com>,
Hans de Goede <hansg@kernel.org>,
Mark Pearson <mpearson-lenovo@squebb.ca>,
Armin Wolf <W_Armin@gmx.de>, Jonathan Corbet <corbet@lwn.net>,
Kurt Borja <kuurtb@gmail.com>,
platform-driver-x86@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
stable@vger.kernel.org
Subject: Re: [PATCH 3/3] platform/x86: lenovo-wmi-other: Balance component bind and unbind
Date: Thu, 9 Apr 2026 15:32:13 +0300 (EEST) [thread overview]
Message-ID: <e305f001-645b-0d90-f2df-ef6f1d44e00e@linux.intel.com> (raw)
In-Reply-To: <20260401190221.1595264-3-i@rong.moe>
[-- Attachment #1: Type: text/plain, Size: 1447 bytes --]
On Thu, 2 Apr 2026, Rong Zhang wrote:
> When lwmi_om_master_bind() fails, the master device's components are
> left bound, with the aggregate device destroyed due to the failure
> (found by sashiko.dev [1]).
>
> Balance calls to component_bind_all() and component_unbind_all() when an
> error is propagated to the component framework.
>
> No functional change intended.
>
> Fixes: edc4b183b794 ("platform/x86: Add Lenovo Other Mode WMI Driver")
> Cc: stable@vger.kernel.org
> Link: https://sashiko.dev/#/patchset/20260331181208.421552-1-derekjohn.clark%40gmail.com [1]
> Signed-off-by: Rong Zhang <i@rong.moe>
> ---
> drivers/platform/x86/lenovo/wmi-other.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/lenovo/wmi-other.c b/drivers/platform/x86/lenovo/wmi-other.c
> index b47418df099f..4b47b5886e33 100644
> --- a/drivers/platform/x86/lenovo/wmi-other.c
> +++ b/drivers/platform/x86/lenovo/wmi-other.c
> @@ -1068,8 +1068,11 @@ static int lwmi_om_master_bind(struct device *dev)
>
> priv->cd00_list = binder.cd00_list;
> priv->cd01_list = binder.cd01_list;
> - if (!priv->cd00_list || !priv->cd01_list)
> + if (!priv->cd00_list || !priv->cd01_list) {
> + component_unbind_all(dev, NULL);
> +
> return -ENODEV;
> + }
>
> lwmi_om_fan_info_collect_cd00(priv);
>
>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
prev parent reply other threads:[~2026-04-09 12:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <499fa3efd5be054ffdda77dd00ad4d8d3391e073.camel@rong.moe>
2026-04-01 19:00 ` [PATCH 1/3] platform/x86: lenovo-wmi-helpers: Fix memory leak in lwmi_dev_evaluate_int() Rong Zhang
2026-04-02 10:06 ` Ilpo Järvinen
2026-04-01 19:00 ` [PATCH 2/3] platform/x86: lenovo-wmi-other: Balance IDA id allocation and free Rong Zhang
2026-04-09 12:29 ` Ilpo Järvinen
2026-04-11 15:54 ` Derek John Clark
2026-04-01 19:00 ` [PATCH 3/3] platform/x86: lenovo-wmi-other: Balance component bind and unbind Rong Zhang
2026-04-09 12:32 ` Ilpo Järvinen [this message]
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=e305f001-645b-0d90-f2df-ef6f1d44e00e@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=W_Armin@gmx.de \
--cc=corbet@lwn.net \
--cc=derekjohn.clark@gmail.com \
--cc=hansg@kernel.org \
--cc=i@rong.moe \
--cc=kuurtb@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpearson-lenovo@squebb.ca \
--cc=platform-driver-x86@vger.kernel.org \
--cc=stable@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