Skip to content

Commit d85f098

Browse files
Qi Xigregkh
authored andcommitted
drm: bridge: cdns-mhdp8546: Fix missing mutex unlock on error path
[ Upstream commit 288dac9 ] Add missing mutex unlock before returning from the error path in cdns_mhdp_atomic_enable(). Fixes: 935a92a ("drm: bridge: cdns-mhdp8546: Fix possible null pointer dereference") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Qi Xi <xiqi2@huawei.com> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20250904034447.665427-1-xiqi2@huawei.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent f9a089d commit d85f098

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2042,8 +2042,10 @@ static void cdns_mhdp_atomic_enable(struct drm_bridge *bridge,
20422042
mhdp_state = to_cdns_mhdp_bridge_state(new_state);
20432043

20442044
mhdp_state->current_mode = drm_mode_duplicate(bridge->dev, mode);
2045-
if (!mhdp_state->current_mode)
2046-
return;
2045+
if (!mhdp_state->current_mode) {
2046+
ret = -EINVAL;
2047+
goto out;
2048+
}
20472049

20482050
drm_mode_set_name(mhdp_state->current_mode);
20492051

0 commit comments

Comments
 (0)