提交 85eb9827 编写于 作者: N Naresh Bhat 提交者: Rafael J. Wysocki

ACPI / fan: Initialize acpi_state variable

Make the following compiler warning go away:

 CC      drivers/acpi/fan.o
drivers/acpi/fan.c: In function ‘fan_get_cur_state’:
drivers/acpi/fan.c:96:9: warning: ‘acpi_state’ may be used uninitialized in this function [-Wuninitialized]

by initializing the local variable acpi_state in fan_get_cur_state().

[rjw: Changelog]
Signed-off-by: NNaresh Bhat <naresh.bhat@linaro.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 b67cf7c4
......@@ -84,7 +84,7 @@ static int fan_get_cur_state(struct thermal_cooling_device *cdev, unsigned long
{
struct acpi_device *device = cdev->devdata;
int result;
int acpi_state;
int acpi_state = ACPI_STATE_D0;
if (!device)
return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册