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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
This commit is contained in:
Dan Carpenter 2016-04-15 17:46:34 +03:00 committed by Darren Hart
parent d0192dca2d
commit a7718360d9
1 changed files with 3 additions and 1 deletions

View File

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