aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/task_mmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/task_mmu.c')
-rw-r--r--fs/proc/task_mmu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index c966413c139b..8fed0f88fbf7 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -119,11 +119,11 @@ static void *m_start(struct seq_file *m, loff_t *pos)
119 119
120 priv->task = get_pid_task(priv->pid, PIDTYPE_PID); 120 priv->task = get_pid_task(priv->pid, PIDTYPE_PID);
121 if (!priv->task) 121 if (!priv->task)
122 return NULL; 122 return ERR_PTR(-ESRCH);
123 123
124 mm = mm_for_maps(priv->task); 124 mm = mm_for_maps(priv->task);
125 if (!mm) 125 if (!mm || IS_ERR(mm))
126 return NULL; 126 return mm;
127 down_read(&mm->mmap_sem); 127 down_read(&mm->mmap_sem);
128 128
129 tail_vma = get_gate_vma(priv->task); 129 tail_vma = get_gate_vma(priv->task);
@@ -728,9 +728,9 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
728 if (!task) 728 if (!task)
729 goto out; 729 goto out;
730 730
731 ret = -EACCES;
732 mm = mm_for_maps(task); 731 mm = mm_for_maps(task);
733 if (!mm) 732 ret = PTR_ERR(mm);
733 if (!mm || IS_ERR(mm))
734 goto out_task; 734 goto out_task;
735 735
736 ret = -EINVAL; 736 ret = -EINVAL;