commit | 61bb11cfa03abc345f27ec14f63929b6f600edff | [log] [tgz] |
---|---|---|
author | Jeff Brown <jeffbrown@google.com> | Thu Aug 11 18:26:11 2011 -0700 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Thu Aug 11 18:26:11 2011 -0700 |
tree | 966e0e0870317c9519d148ec73f634fe80d1f098 | |
parent | c88ba95921444946443794cbaca5911f1a924720 [diff] | |
parent | 063097545e6a273952463803d1a2fab2cb590d4e [diff] |
Merge "Ensure outValue is set, even when an error occurs."
diff --git a/services/input/EventHub.cpp b/services/input/EventHub.cpp index 960e414..1d7cc19 100644 --- a/services/input/EventHub.cpp +++ b/services/input/EventHub.cpp
@@ -312,6 +312,8 @@ } status_t EventHub::getAbsoluteAxisValue(int32_t deviceId, int32_t axis, int32_t* outValue) const { + *outValue = 0; + if (axis >= 0 && axis <= ABS_MAX) { AutoMutex _l(mLock); @@ -328,7 +330,6 @@ return OK; } } - *outValue = 0; return -1; }