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 <ilpo.jarvinen@linux.intel.com>
Link: https://patch.msgid.link/20240731095345.2878-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Ilpo Järvinen 2024-07-31 12:53:45 +03:00 committed by Rafael J. Wysocki
parent 142acc42a7
commit 3745de7f2d

View File

@ -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;