Commit 36f55404 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

ACPI: thermal: Drop some redundant code



Drop some redundant initialization of local variables, a redundant
return statement and a redundant "else" from the ACPI thermal driver.

No functional impact.

Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent 9e8bc166
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -262,7 +262,7 @@ do { \

static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
{
	acpi_status status = AE_OK;
	acpi_status status;
	unsigned long long tmp;
	struct acpi_handle_list devices;
	int valid = 0;
@@ -620,7 +620,8 @@ static int thermal_get_crit_temp(struct thermal_zone_device *thermal,
					tz->trips.critical.temperature,
					tz->kelvin_offset);
		return 0;
	} else
	}

	return -EINVAL;
}

@@ -941,7 +942,7 @@ static void acpi_thermal_aml_dependency_fix(struct acpi_thermal *tz)

static int acpi_thermal_get_info(struct acpi_thermal *tz)
{
	int result = 0;
	int result;

	if (!tz)
		return -EINVAL;
@@ -1018,8 +1019,8 @@ static void acpi_thermal_check_fn(struct work_struct *work)

static int acpi_thermal_add(struct acpi_device *device)
{
	int result = 0;
	struct acpi_thermal *tz = NULL;
	struct acpi_thermal *tz;
	int result;

	if (!device)
		return -EINVAL;
@@ -1060,7 +1061,7 @@ static int acpi_thermal_add(struct acpi_device *device)

static int acpi_thermal_remove(struct acpi_device *device)
{
	struct acpi_thermal *tz = NULL;
	struct acpi_thermal *tz;

	if (!device || !acpi_driver_data(device))
		return -EINVAL;
@@ -1189,7 +1190,7 @@ static const struct dmi_system_id thermal_dmi_table[] __initconst = {

static int __init acpi_thermal_init(void)
{
	int result = 0;
	int result;

	dmi_check_system(thermal_dmi_table);

@@ -1216,8 +1217,6 @@ static void __exit acpi_thermal_exit(void)
{
	acpi_bus_unregister_driver(&acpi_thermal_driver);
	destroy_workqueue(acpi_thermal_pm_queue);

	return;
}

module_init(acpi_thermal_init);