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

Commit 5b13de7a authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

ASoC: Set sgtl5000->ldo in ldo_regulator_register



Otherwise calling ldo_regulator_remove() does not unregister regulator
and free memories.

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarWolfram Sang <w.sang@pengutronix.de>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent ff39dbe9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -806,6 +806,7 @@ static int ldo_regulator_register(struct snd_soc_codec *codec,
				int voltage)
{
	struct ldo_regulator *ldo;
	struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec);

	ldo = kzalloc(sizeof(struct ldo_regulator), GFP_KERNEL);

@@ -840,6 +841,7 @@ static int ldo_regulator_register(struct snd_soc_codec *codec,

		return ret;
	}
	sgtl5000->ldo = ldo;

	return 0;
}