diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-04-15 16:46:34 +0200 |
---|---|---|
committer | Darren Hart <dvhart@linux.intel.com> | 2016-04-15 17:27:15 +0200 |
commit | a7718360d91eedbedd58978ec8fff4a67a866f86 (patch) | |
tree | 8f2358ae1a2554536229954c45509d1ce530e504 /drivers | |
parent | intel_telemetry_pltdrv: Silence an uninitialized variable warning (diff) | |
download | linux-a7718360d91eedbedd58978ec8fff4a67a866f86.tar.xz linux-a7718360d91eedbedd58978ec8fff4a67a866f86.zip |
thinkpad_acpi: Silence an uninitialized variable warning
If fan_get_status() fails then "s" is not initialized. Tweak the error
handling a bit to silence this warning.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index e305ab541a22..9255ff3ee81a 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -7972,10 +7972,12 @@ static int fan_get_status_safe(u8 *status) fan_update_desired_level(s); mutex_unlock(&fan_mutex); + if (rc) + return rc; if (status) *status = s; - return rc; + return 0; } static int fan_get_speed(unsigned int *speed) |