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

Commit e0c1bbbe authored by Wei Wang's avatar Wei Wang
Browse files

Fix powerhint for NULL parameter



Bug: 32640289
Test: manual on marlin
Signed-off-by: default avatarWei Wang <wvw@google.com>
Change-Id: I00c85082f317cb2d47b799a8fd7e892f7b54dc0e
parent 321e1b7c
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -44,8 +44,12 @@ Return<void> Power::setInteractive(bool interactive) {

Return<void> Power::powerHint(PowerHint hint, int32_t data)  {
    int32_t param = data;
    if (mModule->powerHint > 0)
    if (mModule->powerHint > 0) {
        if (data)
            mModule->powerHint(mModule, static_cast<power_hint_t>(hint), &param);
        else
            mModule->powerHint(mModule, static_cast<power_hint_t>(hint), NULL);
    }
    return Void();
}