projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0192dc
)
thinkpad_acpi: Silence an uninitialized variable warning
author
Dan Carpenter
<dan.carpenter@oracle.com>
Fri, 15 Apr 2016 14:46:34 +0000
(17:46 +0300)
committer
Darren Hart
<dvhart@linux.intel.com>
Fri, 15 Apr 2016 15:27:15 +0000
(08:27 -0700)
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>
drivers/platform/x86/thinkpad_acpi.c
patch
|
blob
|
history
diff --git
a/drivers/platform/x86/thinkpad_acpi.c
b/drivers/platform/x86/thinkpad_acpi.c
index e305ab541a2227e1f94ff3e80a0da369ed385946..9255ff3ee81ac74e5fc269f256aed955132e730d 100644
(file)
--- 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)