summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-02-06 22:28:12 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-02-11 21:21:58 +0100
commitabbdf22e0a8f23207cedf9065512620971794ff5 (patch)
treeabe7b8df2a6c1123dc1eb99f777e5f1fcb13a5b5 /drivers/acpi
parentd84e173311c4f0b0300755e6445f3224d252eeed (diff)
ACPI: battery: Drop redundant check from acpi_battery_notify()
The battery pointer check against NULL in acpi_battery_notify() is redundant because the value of that pointer is the one passed to acpi_dev_install_notify_handler() in acpi_battery_probe() as the last argument which is not NULL. Drop the redundant check. No intentional functional impact. Closes: https://lore.kernel.org/linux-acpi/aYXvS1h3Bxf_5sCj@stanley.mountain/ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/5981321.DvuYhMxLoT@rafael.j.wysocki
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/battery.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 3bbddd6f622c..a094763113bc 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -1066,9 +1066,6 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
struct acpi_device *device = battery->device;
struct power_supply *old;
- if (!battery)
- return;
-
guard(mutex)(&battery->update_lock);
old = battery->bat;