diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2020-05-12 16:43:25 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-05-12 19:14:36 +0300 |
commit | 03990fd58d2b7c8f7d53e514ba9b8749fac260f9 (patch) | |
tree | 157fd7c49d9d9cd6a74179dec12b4f8d024e6951 /sound/soc/pxa | |
parent | cc2d025a81a9f9ed4d05f4f65f43a183d6f18c0c (diff) | |
download | linux-03990fd58d2b7c8f7d53e514ba9b8749fac260f9.tar.xz |
ASoC: ti: omap-mcbsp: Fix an error handling path in 'asoc_mcbsp_probe()'
If an error occurs after the call to 'omap_mcbsp_init()', the reference to
'mcbsp->fclk' must be decremented, as already done in the remove function.
This can be achieved easily by using the devm_ variant of 'clk_get()'
when the reference is taken in 'omap_mcbsp_init()'
This fixes the leak in the probe and has the side effect to simplify both
the error handling path of 'omap_mcbsp_init()' and the remove function.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Peter Ujfalusi <peter.ujflausi@ti.com>
Link: https://lore.kernel.org/r/20200512134325.252073-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/pxa')
0 files changed, 0 insertions, 0 deletions