lkml.org 
[lkml]   [2019]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 4.9 60/87] ASoC: fsl-asoc-card: fix object reference leaks in fsl_asoc_card_probe
    Date
    From: wen yang <yellowriver2010@hotmail.com>

    [ Upstream commit 11907e9d3533648615db08140e3045b829d2c141 ]

    The of_find_device_by_node() takes a reference to the underlying device
    structure, we should release that reference.

    Signed-off-by: Wen Yang <yellowriver2010@hotmil.com>
    Cc: Timur Tabi <timur@kernel.org>
    Cc: Nicolin Chen <nicoleotsuka@gmail.com>
    Cc: Xiubo Li <Xiubo.Lee@gmail.com>
    Cc: Fabio Estevam <festevam@gmail.com>
    Cc: Liam Girdwood <lgirdwood@gmail.com>
    Cc: Mark Brown <broonie@kernel.org>
    Cc: Jaroslav Kysela <perex@perex.cz>
    Cc: Takashi Iwai <tiwai@suse.com>
    Cc: alsa-devel@alsa-project.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    sound/soc/fsl/fsl-asoc-card.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
    index dffd549a0e2a..705d2524ec31 100644
    --- a/sound/soc/fsl/fsl-asoc-card.c
    +++ b/sound/soc/fsl/fsl-asoc-card.c
    @@ -689,6 +689,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
    asrc_fail:
    of_node_put(asrc_np);
    of_node_put(codec_np);
    + put_device(&cpu_pdev->dev);
    fail:
    of_node_put(cpu_np);

    --
    2.19.1
    \
     
     \ /
      Last update: 2019-03-27 19:41    [W:3.648 / U:0.332 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site