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

Commit 22386229 authored by George Burgess IV's avatar George Burgess IV Committed by George Burgess
Browse files

Spatializer: add missing `return`

It seems that we intended to return here. Otherwise, we'll deref NULL
below.

If68c99f39040984ff46e27779f211fdfe3126da5 adds attributes to these
functions that will have `clang` emit warnings if their results aren't
used.

Caught by the static analyzer:
> frameworks/av/services/audiopolicy/service/Spatializer.cpp:558:13:
warning: Dereference of null pointer (loaded from variable 'output')
[clang-analyzer-core.NullDereference]

Bug: 188502620
Test: TreeHugger
Change-Id: Idced7c095b6617349737449cf5451abdb22ea6ed
parent 76f1d33e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -539,7 +539,7 @@ Status Spatializer::getParameter(int key, std::vector<unsigned char> *value) {
    ALOGV("%s key %d value size %d", __func__, key,
          (value != nullptr ? (int)value->size() : -1));
    if (value == nullptr) {
        binderStatusFromStatusT(BAD_VALUE);
        return binderStatusFromStatusT(BAD_VALUE);
    }
    std::lock_guard lock(mLock);
    status_t status = INVALID_OPERATION;