Skip to content

Commit be70c65

Browse files
cschutijserjannau
authored andcommitted
drm: apple: backlight: release lock in error path
Signed-off-by: Caspar Schutijser <caspar@schutijser.com>
1 parent 1263c4a commit be70c65

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/gpu/drm/apple/dcp_backlight.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,10 @@ static int drm_crtc_set_brightness(struct apple_dcp *dcp)
150150
goto done;
151151

152152
state = drm_atomic_state_alloc(crtc->dev);
153-
if (!state)
154-
return -ENOMEM;
153+
if (!state) {
154+
ret = -ENOMEM;
155+
goto done;
156+
}
155157

156158
state->acquire_ctx = &ctx;
157159
crtc_state = drm_atomic_get_crtc_state(state, crtc);

0 commit comments

Comments
 (0)