diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-04-15 17:46:34 +0300 |
---|---|---|
committer | Darren Hart <dvhart@linux.intel.com> | 2016-04-15 08:27:15 -0700 |
commit | a7718360d91eedbedd58978ec8fff4a67a866f86 (patch) | |
tree | 8f2358ae1a2554536229954c45509d1ce530e504 /drivers/platform/x86 | |
parent | d0192dca2d6b64c043db5babb40076d13a6e955b (diff) | |
download | op-kernel-dev-a7718360d91eedbedd58978ec8fff4a67a866f86.zip op-kernel-dev-a7718360d91eedbedd58978ec8fff4a67a866f86.tar.gz |
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/platform/x86')
-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 e305ab5..9255ff3 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) |