Unlock mutex on error
Subsystems (3)
PATCH 1/1 Unlock mutex on error
Make sure we pass through ret label to unlock the mutex.
Signed-off-by John van der Kamp <[email protected]>
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +4 -2
@@ -510,8 +510,10 @@ static ssize_t srm_data_read(struct file *filp, struct kobject *kobj, struct bin srm =psp_get_srm (work->hdcp.config.psp.handle, &srm_version, &srm_size); -if (!srm) -return -EINVAL ; +if (!srm) { + ret = -EINVAL ; + goto ret; + }if (pos >= srm_size) ret =0 ;
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Alex Deucher
AppliedApplied. Thanks!
Alex
Quoted 28 lines · John van der Kamp
Make sure we pass through ret label to unlock the mutex.
Signed-off-by John van der Kamp <[email protected]>--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +4
-3@@ -510,8 +510,10 @@ static ssize_t srm_data_read(struct file *filp, struct kobject *kobj, struct bin srm =psp_get_srm (work->hdcp.config.psp.handle, &srm_version, &srm_size); -if (!srm) -return -EINVAL ; +if (!srm) { + ret = -EINVAL ; + goto ret; + }if (pos >= srm_size) ret =0 ; --2.20.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx