提交 a7718360 编写于 作者: D Dan Carpenter 提交者: 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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册