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>
This commit is contained in:
John van der Kamp 2020-06-23 23:30:54 +02:00 committed by Alex Deucher
parent dc2f832ecb
commit 8ef51b428e

View File

@ -546,8 +546,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;