]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
watchdog: ni903x_wdt: Check ACPI_COMPANION() against NULL
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 12 May 2026 16:22:57 +0000 (18:22 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Thu, 2 Jul 2026 14:09:51 +0000 (07:09 -0700)
commit36e05e134ee44f9fbfcebcbcdadb5f765fccd9f0
tree9a3730fb29346142d44bf0f8514a841f498ccca9
parent2b37415618bfc6a83d4aceb00fd8d6491096f2ed
watchdog: ni903x_wdt: Check ACPI_COMPANION() against NULL

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.

Fixes: d37ec2fbab55 ("watchdog: ni903x_wdt: Convert to a platform driver")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/2280455.irdbgypaU6@rafael.j.wysocki
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/watchdog/ni903x_wdt.c