Skip to content

Commit ee434a4

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]> Cc: [email protected]
1 parent 4877846 commit ee434a4

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
@@ -510,8 +510,10 @@ static ssize_t srm_data_read(struct file *filp, struct kobject *kobj, struct bin
510510

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

513-
if (!srm)
514-
return -EINVAL;
513+
if (!srm) {
514+
ret = -EINVAL;
515+
goto ret;
516+
}
515517

516518
if (pos >= srm_size)
517519
ret = 0;

0 commit comments

Comments
 (0)