diff options
author | John van der Kamp <sjonny@suffe.me.uk> | 2020-06-23 23:30:54 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-06-23 18:08:21 -0400 |
commit | ee434a4f9f5ea15b0f84bddd8c012838cf9472c5 (patch) | |
tree | 4e80963b2a04a9ddbc3977ca66fd3acb74e22609 | |
parent | 48778464bb7d346b47157d21ffde2af6b2d39110 (diff) |
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 <sjonny@suffe.me.uk>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c index dcf84a61de37..949d10ef8304 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c @@ -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; |