mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
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:
parent
142acc42a7
commit
3745de7f2d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user