Patch "ASoC: mediatek: mt8192-mt6359: fix device_node leak" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ASoC: mediatek: mt8192-mt6359: fix device_node leak

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     asoc-mediatek-mt8192-mt6359-fix-device_node-leak.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit ea49481d34644624d766c1a21877aa751a35a243
Author: Tzung-Bi Shih <tzungbi@xxxxxxxxxx>
Date:   Tue Dec 14 12:00:28 2021 +0800

    ASoC: mediatek: mt8192-mt6359: fix device_node leak
    
    [ Upstream commit 4e28491a7a198c668437f2be8a91a76aa52f20eb ]
    
    The of_parse_phandle() document:
        >>> Use of_node_put() on it when done.
    
    The driver didn't call of_node_put().  Fixes the leak.
    
    Signed-off-by: Tzung-Bi Shih <tzungbi@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20211214040028.2992627-1-tzungbi@xxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
index a606133951b70..24a5d0adec1ba 100644
--- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
+++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
@@ -1172,7 +1172,11 @@ static int mt8192_mt6359_dev_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	return devm_snd_soc_register_card(&pdev->dev, card);
+	ret = devm_snd_soc_register_card(&pdev->dev, card);
+
+	of_node_put(platform_node);
+	of_node_put(hdmi_codec);
+	return ret;
 }
 
 #ifdef CONFIG_OF



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux