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

Commit 06812760 authored by Dan Carpenter's avatar Dan Carpenter Committed by Daniel Vetter
Browse files

drm/i915: unlock on error in i915_ppgtt_info()



We need to call intel_runtime_pm_put() and mutex_unlock() before
returning.

Fixes: 7cb5dff8 ('drm/i915: fix task reference leak in i915_debugfs.c')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarGeliang Tang <geliangtang@163.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 022e4e52
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -2298,18 +2298,21 @@ static int i915_ppgtt_info(struct seq_file *m, void *data)
		struct task_struct *task;

		task = get_pid_task(file->pid, PIDTYPE_PID);
		if (!task)
			return -ESRCH;
		if (!task) {
			ret = -ESRCH;
			goto out_put;
		}
		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_put:
	intel_runtime_pm_put(dev_priv);
	mutex_unlock(&dev->struct_mutex);

	return 0;
	return ret;
}

static int count_irq_waiters(struct drm_i915_private *i915)