Skip to content

Commit

Permalink
ACPI / fan: Initialize acpi_state variable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Naresh Bhat authored and Rafael J. Wysocki committed Jul 4, 2013
1 parent b67cf7c commit 85eb982
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/fan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 85eb982

Please sign in to comment.