]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/sti: hdmi: convert to devm_drm_bridge_alloc() API
authorLuca Ceresoli <luca.ceresoli@bootlin.com>
Tue, 8 Jul 2025 15:24:42 +0000 (17:24 +0200)
committerLuca Ceresoli <luca.ceresoli@bootlin.com>
Wed, 9 Jul 2025 09:24:45 +0000 (11:24 +0200)
commitac4531424d907f3983e919a7bda2b90ea0cede4f
tree271a2023ba653a715796d7f3aa18f1a3faec0f2c
parent03d5236014a5d298c26b2ca80e5834aa844574b3
drm/sti: hdmi: convert to devm_drm_bridge_alloc() API

devm_drm_bridge_alloc() is the new API to be used for allocating (and
partially initializing) a private driver struct embedding a struct
drm_bridge.

This driver was missed during the automated conversion in commit
9c399719cfb9 ("drm: convert many bridge drivers from devm_kzalloc() to
devm_drm_bridge_alloc() API") and following commits.

The lack of conversion for this driver is a bug since commit a7748dd127ea
("drm/bridge: get/put the bridge reference in drm_bridge_add/remove()")
which is the first commmit having added a drm_bridge_get/put() pair and
thus exposing the incorrect initial refcount issue.

Fix this by switching the driver to the new API.

Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Closes: https://lore.kernel.org/all/ce9c6aa3-5372-468f-a4bf-5a261259e459@samsung.com/
Fixes: a7748dd127ea ("drm/bridge: get/put the bridge reference in drm_bridge_add/remove()")
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250708-drm-bridge-convert-to-alloc-api-leftovers-v1-1-6285de8c3759@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
drivers/gpu/drm/sti/sti_hdmi.c
drivers/gpu/drm/sti/sti_hdmi.h