]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
proc: use IS_ERR_OR_NULL()
authorCong Wang <xiyou.wangcong@gmail.com>
Wed, 25 Apr 2012 01:04:45 +0000 (11:04 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 30 Apr 2012 05:17:40 +0000 (15:17 +1000)
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/proc/base.c
fs/proc/task_mmu.c
fs/proc/task_nommu.c

index 84192c0d10691ebcdf4d449d97f1c39a56c1157e..aefdba647668cb866f37837b9b487ebc983eb1dc 100644 (file)
@@ -239,7 +239,7 @@ static int proc_pid_auxv(struct task_struct *task, char *buffer)
 {
        struct mm_struct *mm = mm_access(task, PTRACE_MODE_READ);
        int res = PTR_ERR(mm);
-       if (mm && !IS_ERR(mm)) {
+       if (!IS_ERR_OR_NULL(mm)) {
                unsigned int nwords = 0;
                do {
                        nwords += 2;
index 4650f6f5aede6e2c0cd63eb9dd40085752e2a31b..a580c69764715e19c7a1133e68c5d02febb6b0d5 100644 (file)
@@ -126,7 +126,7 @@ static void *m_start(struct seq_file *m, loff_t *pos)
                return ERR_PTR(-ESRCH);
 
        mm = mm_access(priv->task, PTRACE_MODE_READ);
-       if (!mm || IS_ERR(mm))
+       if (IS_ERR_OR_NULL(mm))
                return mm;
        down_read(&mm->mmap_sem);
 
@@ -913,7 +913,7 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
 
        mm = mm_access(task, PTRACE_MODE_READ);
        ret = PTR_ERR(mm);
-       if (!mm || IS_ERR(mm))
+       if (IS_ERR_OR_NULL(mm))
                goto out_free;
 
        pagemap_walk.pmd_entry = pagemap_pte_range;
index 1ccfa537f5f5dfaac3c1351dabe391f0ca3e6d22..57ad3cfc084b25a5e067dd70a28de8d4fea37de9 100644 (file)
@@ -224,7 +224,7 @@ static void *m_start(struct seq_file *m, loff_t *pos)
                return ERR_PTR(-ESRCH);
 
        mm = mm_access(priv->task, PTRACE_MODE_READ);
-       if (!mm || IS_ERR(mm)) {
+       if (IS_ERR_OR_NULL(mm)) {
                put_task_struct(priv->task);
                priv->task = NULL;
                return mm;