The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Hans de Goede <hansg@kernel.org>
Subject: Re: [PATCH v1] ACPI: driver: Check ACPI_COMPANION() against NULL during probe
Date: Sun, 10 May 2026 09:19:09 +0300	[thread overview]
Message-ID: <agAjXbnPamNFd0gA@ashevche-desk.local> (raw)
In-Reply-To: <4516068.ejJDZkT8p0@rafael.j.wysocki>

On Fri, May 08, 2026 at 08:04:33PM +0200, Rafael J. Wysocki wrote:

> Since every platform driver can be forced to match a device that doesn't
> match its list of device IDs because of device_match_driver_override(),
> platform drivers that rely on the existence of a device's ACPI companion
> object should verify its presence.
> 
> Accordingly, add requisite ACPI_COMPANION() or ACPI_HANDLE() checks
> against NULL to 13 platform drivers handling core ACPI devices.
> 
> Also change the value returned by the ACPI thermal zone driver when
> the device's ACPI companion is not present to -ENODEV for consistency
> with the other drivers.

Yeah, or somehow to disable that matching.
As a (quick) fix this patch seems fine to me.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

-- 
With Best Regards,
Andy Shevchenko



      parent reply	other threads:[~2026-05-10  6:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08 18:04 [PATCH v1] ACPI: driver: Check ACPI_COMPANION() against NULL during probe Rafael J. Wysocki
2026-05-09 16:01 ` Hans de Goede
2026-05-10  6:19 ` Andy Shevchenko [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=agAjXbnPamNFd0gA@ashevche-desk.local \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=hansg@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@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