On Wed, Jan 08, 2025 at 09:50:45AM +0900, Joe Hattori wrote: > qcom_smd_register_edge() leaks an OF node reference when > qcom_smd_create_chrdev() fails, since qcom_smd_parse_edge() sets > of_node_get(node) to edge->of_node. Add of_node_put() calls to the error > path of qcom_smd_register_edge() and qcom_smd_unregister_edge(). > > This was found by an experimental verifier that I am developing. Due to > the lack of actual devices, no runtime test was able to be performed. > > Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend") > Signed-off-by: Joe Hattori <joe@xxxxxxxxxxxxxxxxxxxxx> > --- > Changes in v2: > - Put edge->of_node for clarity. > --- > drivers/rpmsg/qcom_smd.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> -- With best wishes Dmitry