Re: [PATCH v1] watchdog: ni903x_wdt: Check ACPI_COMPANION() against NULL
From: Andy Shevchenko
Date: Tue May 12 2026 - 13:04:41 EST
On Tue, May 12, 2026 at 06:22:57PM +0200, Rafael J. Wysocki wrote:
> 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(), so
> platform drivers that rely on the existence of a device's ACPI companion
> object need to verify its presence.
>
> Accordingly, add a requisite ACPI_COMPANION() check against NULL to the
> ni903x_wdt watchdog driver.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
...
> - status = acpi_walk_resources(ACPI_HANDLE(dev), METHOD_NAME__CRS,
> + status = acpi_walk_resources(handle, METHOD_NAME__CRS,
> ni903x_resources, wdt);
This smells like we can move to regular acpi_dev_*() resource APIs rather than
custom walking via _CRS. But I haven't looked into the code.
--
With Best Regards,
Andy Shevchenko