This is a note to let you know that I've just added the patch titled drm/meson: Fix refcount leak in meson_encoder_hdmi_init 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: drm-meson-fix-refcount-leak-in-meson_encoder_hdmi_init.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. >From 7381076809586528e2a812a709e2758916318a99 Mon Sep 17 00:00:00 2001 From: Miaoqian Lin <linmq006@xxxxxxxxx> Date: Wed, 11 May 2022 09:40:51 +0400 Subject: drm/meson: Fix refcount leak in meson_encoder_hdmi_init From: Miaoqian Lin <linmq006@xxxxxxxxx> commit 7381076809586528e2a812a709e2758916318a99 upstream. of_find_device_by_node() takes reference, we should use put_device() to release it when not need anymore. Add missing put_device() in error path to avoid refcount leak. Fixes: 0af5e0b41110 ("drm/meson: encoder_hdmi: switch to bridge DRM_BRIDGE_ATTACH_NO_CONNECTOR") Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx> Reviewed-by: Neil Armstrong <narmstrong@xxxxxxxxxxxx> Signed-off-by: Neil Armstrong <narmstrong@xxxxxxxxxxxx> Link: https://patchwork.freedesktop.org/patch/msgid/20220511054052.51981-1-linmq006@xxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/meson/meson_encoder_hdmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/meson/meson_encoder_hdmi.c +++ b/drivers/gpu/drm/meson/meson_encoder_hdmi.c @@ -438,8 +438,10 @@ int meson_encoder_hdmi_init(struct meson cec_fill_conn_info_from_drm(&conn_info, meson_encoder_hdmi->connector); notifier = cec_notifier_conn_register(&pdev->dev, NULL, &conn_info); - if (!notifier) + if (!notifier) { + put_device(&pdev->dev); return -ENOMEM; + } meson_encoder_hdmi->cec_notifier = notifier; } Patches currently in stable-queue which might be from linmq006@xxxxxxxxx are queue-5.15/remoteproc-k3-r5-fix-refcount-leak-in-k3_r5_cluster_.patch queue-5.15/mtd-partitions-fix-refcount-leak-in-parse_redboot_of.patch queue-5.15/powerpc-spufs-fix-refcount-leak-in-spufs_init_isolat.patch queue-5.15/cpufreq-zynq-fix-refcount-leak-in-zynq_get_revision.patch queue-5.15/powerpc-cell-axon_msi-fix-refcount-leak-in-setup_msi.patch queue-5.15/arm-omap2-fix-refcount-leak-in-omapdss_init_of.patch queue-5.15/drm-mcde-fix-refcount-leak-in-mcde_dsi_bind.patch queue-5.15/soc-qcom-ocmem-fix-refcount-leak-in-of_get_ocmem.patch queue-5.15/rpmsg-qcom_smd-fix-refcount-leak-in-qcom_smd_parse_e.patch queue-5.15/asoc-mt6797-mt6351-fix-refcount-leak-in-mt6797_mt635.patch queue-5.15/mfd-max77620-fix-refcount-leak-in-max77620_initialis.patch queue-5.15/asoc-samsung-fix-error-handling-in-aries_audio_probe.patch queue-5.15/powerpc-xive-fix-refcount-leak-in-xive_get_max_prio.patch queue-5.15/pci-mediatek-gen3-fix-refcount-leak-in-mtk_pcie_init.patch queue-5.15/media-tw686x-fix-memory-leak-in-tw686x_video_init.patch queue-5.15/soc-qcom-aoss-fix-refcount-leak-in-qmp_cooling_devic.patch queue-5.15/drm-meson-encoder_hdmi-fix-refcount-leak-in-meson_en.patch queue-5.15/mtd-maps-fix-refcount-leak-in-of_flash_probe_versati.patch queue-5.15/of-device-fix-missing-of_node_put-in-of_dma_set_rest.patch queue-5.15/mmc-sdhci-of-esdhc-fix-refcount-leak-in-esdhc_signal.patch queue-5.15/asoc-mediatek-mt8173-rt5650-fix-refcount-leak-in-mt8.patch queue-5.15/remoteproc-imx_rproc-fix-refcount-leak-in-imx_rproc_.patch queue-5.15/drm-virtio-fix-null-vs-is_err-checking-in-virtio_gpu.patch queue-5.15/usb-host-fix-refcount-leak-in-ehci_hcd_ppc_of_probe.patch queue-5.15/pci-tegra194-fix-pm-error-handling-in-tegra_pcie_con.patch queue-5.15/arm-bcm-fix-refcount-leak-in-bcm_kona_smc_init.patch queue-5.15/usb-ohci-nxp-fix-refcount-leak-in-ohci_hcd_nxp_probe.patch queue-5.15/pci-microchip-fix-refcount-leak-in-mc_pcie_init_irq_.patch queue-5.15/asoc-cros_ec_codec-fix-refcount-leak-in-cros_ec_code.patch queue-5.15/mtd-maps-fix-refcount-leak-in-ap_flash_init.patch queue-5.15/meson-mx-socinfo-fix-refcount-leak-in-meson_mx_socin.patch queue-5.15/asoc-qcom-fix-missing-of_node_put-in-asoc_qcom_lpass.patch queue-5.15/arm-omap2-fix-refcount-leak-in-omap3xxx_prm_late_ini.patch queue-5.15/drm-meson-fix-refcount-leak-in-meson_encoder_hdmi_init.patch queue-5.15/asoc-mediatek-mt8173-fix-refcount-leak-in-mt8173_rt5.patch queue-5.15/mtd-parsers-ofpart-fix-refcount-leak-in-bcm4908_part.patch