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: Naresh Bhat <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
Naresh Bhat 2013-07-01 19:51:00 +05:30 • committed by Rafael J. Wysocki
commit 85eb98274f

View file

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