diff options
author | Naresh Bhat <naresh.bhat@linaro.org> | 2013-07-01 10:21:00 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-07-04 07:33:25 -0400 |
commit | 85eb98274fd81c44e721c275ced54661ee9d5b05 (patch) | |
tree | 8b88ec1569f94e53791a0006feecdf4cd6c184c6 | |
parent | b67cf7c44c7e6b485f1c255ac3c1fe98cc99b677 (diff) |
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 <naresh.bhat@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/fan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c index 8d1c0105e113..5b02a0aa540c 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 | |||
84 | { | 84 | { |
85 | struct acpi_device *device = cdev->devdata; | 85 | struct acpi_device *device = cdev->devdata; |
86 | int result; | 86 | int result; |
87 | int acpi_state; | 87 | int acpi_state = ACPI_STATE_D0; |
88 | 88 | ||
89 | if (!device) | 89 | if (!device) |
90 | return -EINVAL; | 90 | return -EINVAL; |