]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: ux500: mop500: Fix some refcounted resources issues
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 12 May 2020 10:07:05 +0000 (12:07 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 12 May 2020 16:14:34 +0000 (17:14 +0100)
commitd97ebc137836478afd7e61695f1b23da2d8e4f31
tree330364cece3276ae5adbe1ed7f6c865e2ad9c143
parent9de6fdebb02e80b7a671e2c0f25dd6f647fc2685
ASoC: ux500: mop500: Fix some refcounted resources issues

There are 2 issues here:
   - if one of the 'of_parse_phandle' fails, calling 'mop500_of_node_put()'
     is a no-op because the 'mop500_dai_links' structure has not been
     initialized yet, so the referenced are not decremented
   - The reference stored in 'mop500_dai_links[i].codecs' is refcounted
     only once in the probe and must be decremented only once.

Fixes: 3a8a2a82b602 ("ASoC: Ux500: Dispose of device nodes correctly")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/20200512100705.246349-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/ux500/mop500.c