summaryrefslogtreecommitdiff
path: root/rust/alloc/collections/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-02-12 14:26:54 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-02-13 14:22:19 +0100
commitb83afb7e8c3388dc82b5ea5b15d328d569a6fc41 (patch)
tree5a9937b802f5fce3db32848b5c143e2202b42e74 /rust/alloc/collections/git@git.tavy.me:linux.git
parentabbdf22e0a8f23207cedf9065512620971794ff5 (diff)
ACPI: battery: Drop redundant checks from acpi_battery_remove()
In acpi_battery_remove(), "battery" cannot be NULL because it is the driver data of the platform device passed to that function and it has been set by acpi_battery_probe(), so drop the redundant check of it against NULL. Moreover, getting the ACPI device pointer from battery->device is slightly less overhead than using the ACPI_COMPANION() macro on the platform device to retrieve it, so do that and drop the check of that pointer against NULL which is also redundant. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/12836976.O9o76ZdvQC@rafael.j.wysocki
Diffstat (limited to 'rust/alloc/collections/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions