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

Commit 24edf31e authored by Umesh Vats's avatar Umesh Vats Committed by Gerrit - the friendly Code Review server
Browse files

Bluetooth: Re-initialize regulator to NULL on error



Reset the regulator to NULL when its allocation fails.

Change-Id: Ibf1a08683efe547746ee69d7430978fc05df2b59
Signed-off-by: default avatarUmesh Vats <uvats@codeaurora.org>
parent 92760fd0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -92,6 +92,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;
	}