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

Commit 7fa2f55c 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: I5e9fcad83d0ed449c225c7c5c99d93ebae9848fc
Signed-off-by: default avatarUmesh Vats <uvats@codeaurora.org>
parent a70116e1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -511,6 +511,7 @@ static int bt_power_vreg_set(enum bt_power_modes mode)
							vreg_info->name);
				if (IS_ERR(vreg_info->reg)) {
					ret = PTR_ERR(vreg_info->reg);
					vreg_info->reg = NULL;
					pr_err("%s: regulator_get(%s) failed. rc=%d\n",
						__func__, vreg_info->name, ret);
					goto out;