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

Commit 12b25c5d authored by Myles Watson's avatar Myles Watson
Browse files

btm: Return the result in btm_pm_compare_modes

Test: build
Bug: 67383347
Change-Id: Id4407c1a73592674f0d86b1be1152abc088908b5
parent 9fb22b98
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -425,7 +425,7 @@ static tBTM_PM_PWR_MD* btm_pm_compare_modes(tBTM_PM_PWR_MD* p_md1,
    *p_res = *p_md2;
    p_res->mode &= ~BTM_PM_MD_FORCE;

    return p_md2;
    return p_res;
  }

  if (p_md2->mode == BTM_PM_MD_ACTIVE || p_md1->mode == BTM_PM_MD_ACTIVE) {
@@ -450,11 +450,11 @@ static tBTM_PM_PWR_MD* btm_pm_compare_modes(tBTM_PM_PWR_MD* p_md1,
  switch (res) {
    case BTM_PM_GET_MD1:
      *p_res = *p_md1;
      return p_md1;
      return p_res;

    case BTM_PM_GET_MD2:
      *p_res = *p_md2;
      return p_md2;
      return p_res;

    case BTM_PM_GET_COMP:
      p_res->mode = p_md1->mode;