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

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
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment