mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
Bluetooth: Re-initialize regulator to NULL on error
Reset the regulator to NULL when its allocation fails. Change-Id: I5e9fcad83d0ed449c225c7c5c99d93ebae9848fc Signed-off-by: Umesh Vats <uvats@codeaurora.org>
This commit is contained in:
parent
a70116e190
commit
7fa2f55c9b
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue