]> git.baikalelectronics.ru Git - kernel.git/commit
drm/meson: Fix refcount leak in meson_encoder_hdmi_init
authorMiaoqian Lin <linmq006@gmail.com>
Wed, 11 May 2022 05:40:51 +0000 (09:40 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:30 +0000 (14:24 +0200)
commitf6b14c36e405d83c8c8d9661f7ba3279aaa65e41
tree05d236e51a4be4c923cbf80f8f62afbbbcaa2c26
parent42ef024d10bf3d5e453227de86d7b4609a574eb2
drm/meson: Fix refcount leak in meson_encoder_hdmi_init

commit a4f97b62ea9c062a50cbbfee0fb65bab03e3aada 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: bcf5446630b8 ("drm/meson: encoder_hdmi: switch to bridge DRM_BRIDGE_ATTACH_NO_CONNECTOR")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220511054052.51981-1-linmq006@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/meson/meson_encoder_hdmi.c