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:
parent
d0192dca2d
commit
a7718360d9
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue