Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61bb11cf authored by Jeff Brown's avatar Jeff Brown Committed by Android (Google) Code Review
Browse files

Merge "Ensure outValue is set, even when an error occurs."

parents c88ba959 06309754
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -312,6 +312,8 @@ int32_t EventHub::getSwitchState(int32_t deviceId, int32_t sw) const {
}

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 @@ status_t EventHub::getAbsoluteAxisValue(int32_t deviceId, int32_t axis, int32_t*
            return OK;
        }
    }
    *outValue = 0;
    return -1;
}