Skip to content

Commit 8ef51b4

Browse files
John van der Kampalexdeucher
authored andcommitted
drm/amdgpu/display: Unlock mutex on error
Make sure we pass through ret label to unlock the mutex. Signed-off-by: John van der Kamp <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent dc2f832 commit 8ef51b4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,10 @@ static ssize_t srm_data_read(struct file *filp, struct kobject *kobj, struct bin
546546

547547
srm = psp_get_srm(work->hdcp.config.psp.handle, &srm_version, &srm_size);
548548

549-
if (!srm)
550-
return -EINVAL;
549+
if (!srm) {
550+
ret = -EINVAL;
551+
goto ret;
552+
}
551553

552554
if (pos >= srm_size)
553555
ret = 0;

0 commit comments

Comments
 (0)