Skip to content

Commit

Permalink
drm/i915: Fix missing unlock on error in i915_ppgtt_info()
Browse files Browse the repository at this point in the history
Add the missing unlock before return from function i915_ppgtt_info()
in the error handling case.

Fixes: 1d2ac40(drm: Protect dev->filelist with its own mutex)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Daniel 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 b021248)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
  • Loading branch information
Wei Yongjun authored and Jani Nikula committed Jun 30, 2016
1 parent 6b9dc6a commit cab1032
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/i915_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit cab1032

Please sign in to comment.