diff options
author | Ilpo Järvinen <[email protected]> | 2024-07-31 12:53:45 +0300 |
---|---|---|
committer | Rafael J. Wysocki <[email protected]> | 2024-08-02 16:22:11 +0200 |
commit | 3745de7f2d00d44e098a2cae148cd9c1f1534070 (patch) | |
tree | 9c47621bc097b801fe2c0ff13936d9e04167c3ff | |
parent | 142acc42a7443f377b1a452ce906dc3adec91f70 (diff) |
ACPI: battery: Remove redundant NULL initalizations
A local 'battery' variable is initialized to NULL on two occassions
where it is unconditionally rewritten later. Remove the unnecessary
initializations.
Signed-off-by: Ilpo Järvinen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Rafael J. Wysocki <[email protected]>
-rw-r--r-- | drivers/acpi/battery.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 857d4ef38469..8fe27880ea88 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -1207,7 +1207,7 @@ static int acpi_battery_update_retry(struct acpi_battery *battery) static int acpi_battery_add(struct acpi_device *device) { int result = 0; - struct acpi_battery *battery = NULL; + struct acpi_battery *battery; if (!device) return -EINVAL; @@ -1260,7 +1260,7 @@ fail: static void acpi_battery_remove(struct acpi_device *device) { - struct acpi_battery *battery = NULL; + struct acpi_battery *battery; if (!device || !acpi_driver_data(device)) return; |