Skip to content

Commit abbdf22

Browse files
committed
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
1 parent d84e173 commit abbdf22

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

drivers/acpi/battery.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,9 +1066,6 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
10661066
struct acpi_device *device = battery->device;
10671067
struct power_supply *old;
10681068

1069-
if (!battery)
1070-
return;
1071-
10721069
guard(mutex)(&battery->update_lock);
10731070

10741071
old = battery->bat;

0 commit comments

Comments
 (0)