[PATCH] ACPI/fan: Initialize acpi_state variable

From: naresh . bhat
Date: Mon Jul 01 2013 - 10:21:21 EST


From: Naresh Bhat <naresh.bhat@xxxxxxxxxx>

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]

Signed-off-by: Naresh Bhat <naresh.bhat@xxxxxxxxxx>
---
drivers/acpi/fan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index 8d1c010..5b02a0a 100644
--- a/drivers/acpi/fan.c
+++ b/drivers/acpi/fan.c
@@ -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;
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/