diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-07-02 03:36:11 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-07-02 03:36:11 +0000 |
commit | 82b17b5879abea08aa041fea80df1272ea0d7f32 (patch) | |
tree | 12e68b66d1a6cfc0949141c4fec0ef5146f86f42 /sys/dev/pci/drm | |
parent | 14e0c7472c1d637deabc77d2d92438f4ca200e3f (diff) |
drm/amdgpu/display: Unlock mutex on error
From John van der Kamp
6b5d1b40a668add6275072a71d0e17fb9e15de67 in linux 5.7.y/5.7.7
ee434a4f9f5ea15b0f84bddd8c012838cf9472c5 in mainline linux
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r-- | sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c index 3513b48aeda..aeb8cb23a91 100644 --- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +++ b/sys/dev/pci/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; |