Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cab10327 authored by Wei Yongjun's avatar Wei Yongjun Committed by Jani Nikula
Browse files

drm/i915: Fix missing unlock on error in i915_ppgtt_info()



Add the missing unlock before return from function i915_ppgtt_info()
in the error handling case.

Fixes: 1d2ac403(drm: Protect dev->filelist with its own mutex)
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1465861320-26221-1-git-send-email-weiyj_lk@163.com


(cherry picked from commit b0212486)
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 6b9dc6a4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2365,16 +2365,16 @@ static int i915_ppgtt_info(struct seq_file *m, void *data)
		task = get_pid_task(file->pid, PIDTYPE_PID);
		if (!task) {
			ret = -ESRCH;
			goto out_put;
			goto out_unlock;
		}
		seq_printf(m, "\nproc: %s\n", task->comm);
		put_task_struct(task);
		idr_for_each(&file_priv->context_idr, per_file_ctx,
			     (void *)(unsigned long)m);
	}
out_unlock:
	mutex_unlock(&dev->filelist_mutex);

out_put:
	intel_runtime_pm_put(dev_priv);
	mutex_unlock(&dev->struct_mutex);