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

Commit 35d9dae1 authored by Liuliu Zhao's avatar Liuliu Zhao
Browse files

bt_power: Fix BT enable issue



Fix the potential issue in bluetooth power driver by setting the pointer
variable to NULL if IS_ERR condition containing errno when doing
regulator_get in bt_vreg_init.

CRs-Fixed: 2349213
Change-Id: I58139cb7bbef048b91b4112254d95130dc947702
Signed-off-by: default avatarLiuliu Zhao <liulzhao@codeaurora.org>
parent 2a0ec76d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ static int bt_vreg_init(struct bt_power_vreg_data *vreg)
		rc = PTR_ERR(vreg->reg);
		pr_err("%s: regulator_get(%s) failed. rc=%d\n",
			__func__, vreg->name, rc);
		vreg->reg = NULL;
		goto out;
	}