Skip to content

Commit 288dac9

Browse files
Qi Xilucaceresoli
authored andcommitted
drm: bridge: cdns-mhdp8546: Fix missing mutex unlock on error path
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 <[email protected]> Signed-off-by: Qi Xi <[email protected]> Reviewed-by: Luca Ceresoli <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Luca Ceresoli <[email protected]>
1 parent a10f910 commit 288dac9

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
@@ -1984,8 +1984,10 @@ static void cdns_mhdp_atomic_enable(struct drm_bridge *bridge,
19841984
mhdp_state = to_cdns_mhdp_bridge_state(new_state);
19851985

19861986
mhdp_state->current_mode = drm_mode_duplicate(bridge->dev, mode);
1987-
if (!mhdp_state->current_mode)
1988-
return;
1987+
if (!mhdp_state->current_mode) {
1988+
ret = -EINVAL;
1989+
goto out;
1990+
}
19891991

19901992
drm_mode_set_name(mhdp_state->current_mode);
19911993

0 commit comments

Comments
 (0)