Patch "ASoC: cros_ec_codec: Fix refcount leak in cros_ec_codec_platform_probe" has been added to the 5.18-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: cros_ec_codec: Fix refcount leak in cros_ec_codec_platform_probe

to the 5.18-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-cros_ec_codec-fix-refcount-leak-in-cros_ec_code.patch
and it can be found in the queue-5.18 subdirectory.

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



commit f21f047eb6e7d96d5cd2bca26e6bcddf6609f0e2
Author: Miaoqian Lin <linmq006@xxxxxxxxx>
Date:   Fri Jun 3 17:10:43 2022 +0400

    ASoC: cros_ec_codec: Fix refcount leak in cros_ec_codec_platform_probe
    
    [ Upstream commit 0a034d93ee929a9ea89f3fa5f1d8492435b9ee6e ]
    
    of_parse_phandle() returns a node pointer with refcount
    incremented, we should use of_node_put() on it when not need anymore.
    Add missing of_node_put() to avoid refcount leak.
    
    Fixes: b6bc07d4360d ("ASoC: cros_ec_codec: support WoV")
    Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx>
    Reviewed-by: Tzung-Bi Shih <tzungbi@xxxxxxxxxx>
    Reviewed-by: Guenter Roeck <groeck@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220603131043.38907-1-linmq006@xxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/codecs/cros_ec_codec.c b/sound/soc/codecs/cros_ec_codec.c
index 9b92e1a0d1a3..43561ff1bb8d 100644
--- a/sound/soc/codecs/cros_ec_codec.c
+++ b/sound/soc/codecs/cros_ec_codec.c
@@ -994,6 +994,7 @@ static int cros_ec_codec_platform_probe(struct platform_device *pdev)
 			dev_dbg(dev, "ap_shm_phys_addr=%#llx len=%#x\n",
 				priv->ap_shm_phys_addr, priv->ap_shm_len);
 		}
+		of_node_put(node);
 	}
 #endif
 



[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