Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7718360 authored by Dan Carpenter's avatar Dan Carpenter Committed by Darren Hart
Browse files

thinkpad_acpi: Silence an uninitialized variable warning



If fan_get_status() fails then "s" is not initialized.  Tweak the error
handling a bit to silence this warning.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
parent d0192dca
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -7972,10 +7972,12 @@ static int fan_get_status_safe(u8 *status)
		fan_update_desired_level(s);
	mutex_unlock(&fan_mutex);

	if (rc)
		return rc;
	if (status)
		*status = s;

	return rc;
	return 0;
}

static int fan_get_speed(unsigned int *speed)