mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Carlos Bilbao <carlos.bilbao.osdev@gmail.com>
To: Jiale Yao <yaojiale02@163.com>, platform-driver-x86@vger.kernel.org
Cc: "Naveen Krishna Chatradhi" <naveenkrishna.chatradhi@amd.com>,
	"Carlos Bilbao" <carlos.bilbao@kernel.org>,
	"Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/3] platform/x86: hsmp: Check ACPI_COMPANION() against NULL
Date: Fri, 17 Jul 2026 20:14:23 -0700	[thread overview]
Message-ID: <056b1312-f6f5-4c85-adae-d9b9ce6857b5@gmail.com> (raw)
In-Reply-To: <20260713151422.82947-3-yaojiale02@163.com>

On 7/13/26 08:14, Jiale Yao wrote:

> Add a requisite ACPI_COMPANION() check against NULL to the
> AMD HSMP acpi probe, aligning with the fix applied to
> asus-wireless driver.


The commit message makes no sense.


>
> Assisted-by: claude:deepseek-v4-pro
> Signed-off-by: Jiale Yao <yaojiale02@163.com>
> ---
>   drivers/platform/x86/amd/hsmp/acpi.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/platform/x86/amd/hsmp/acpi.c b/drivers/platform/x86/amd/hsmp/acpi.c
> index 97ed71593bdf..615b3ebe66e7 100644
> --- a/drivers/platform/x86/amd/hsmp/acpi.c
> +++ b/drivers/platform/x86/amd/hsmp/acpi.c
> @@ -71,6 +71,8 @@ static inline int hsmp_get_uid(struct device *dev, u16 *sock_ind)
>   {
>   	char *uid;
>   
> +	if (!ACPI_COMPANION(dev))
> +		return -ENODEV;


Check uid != NULL after the assignment below too, then?


>   	/*
>   	 * UID (ID00, ID01..IDXX) is used for differentiating sockets,
>   	 * read it and strip the "ID" part of it and convert the remaining


Thanks,

Carlos


      reply	other threads:[~2026-07-18  3:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13 15:14 [PATCH v3 1/3] platform/x86: asus-wireless: " Jiale Yao
2026-07-13 15:14 ` [PATCH v3 2/3] platform/x86: topstar-laptop: " Jiale Yao
2026-07-13 15:14 ` [PATCH v3 3/3] platform/x86: hsmp: " Jiale Yao
2026-07-18  3:14   ` Carlos Bilbao [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=056b1312-f6f5-4c85-adae-d9b9ce6857b5@gmail.com \
    --to=carlos.bilbao.osdev@gmail.com \
    --cc=carlos.bilbao@kernel.org \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=naveenkrishna.chatradhi@amd.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=yaojiale02@163.com \
    /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®