]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: signal: remove unneeded err handling
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Sat, 13 Sep 2008 00:02:53 +0000 (17:02 -0700)
committerIngo Molnar <mingo@elte.hu>
Sun, 14 Sep 2008 13:35:51 +0000 (15:35 +0200)
This patch eliminates unused or unneeded variable handling.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/ia32/ia32_signal.c
arch/x86/kernel/signal_32.c
arch/x86/kernel/signal_64.c

index 5f42cfcc1c5ad512f3176ca1183df05de8cfd748..e47bed2440eee3bdb9bf5c1f3ba24e3b2a978684 100644 (file)
@@ -446,18 +446,15 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka,
        if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
                return -EFAULT;
 
-       err |= __put_user(sig, &frame->sig);
-       if (err)
+       if (__put_user(sig, &frame->sig))
                return -EFAULT;
 
-       err |= ia32_setup_sigcontext(&frame->sc, fpstate, regs, set->sig[0]);
-       if (err)
+       if (ia32_setup_sigcontext(&frame->sc, fpstate, regs, set->sig[0]))
                return -EFAULT;
 
        if (_COMPAT_NSIG_WORDS > 1) {
-               err |= __copy_to_user(frame->extramask, &set->sig[1],
-                                     sizeof(frame->extramask));
-               if (err)
+               if (__copy_to_user(frame->extramask, &set->sig[1],
+                                  sizeof(frame->extramask)))
                        return -EFAULT;
        }
 
index 1c22e0067fe75a9f7575e603098628f2ba58ebff..d433861a659918a277b920bfde10c8d632f290a0 100644 (file)
@@ -351,18 +351,15 @@ __setup_frame(int sig, struct k_sigaction *ka, sigset_t *set,
        if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
                return -EFAULT;
 
-       err = __put_user(sig, &frame->sig);
-       if (err)
+       if (__put_user(sig, &frame->sig))
                return -EFAULT;
 
-       err = setup_sigcontext(&frame->sc, fpstate, regs, set->sig[0]);
-       if (err)
+       if (setup_sigcontext(&frame->sc, fpstate, regs, set->sig[0]))
                return -EFAULT;
 
        if (_NSIG_WORDS > 1) {
-               err = __copy_to_user(&frame->extramask, &set->sig[1],
-                                     sizeof(frame->extramask));
-               if (err)
+               if (__copy_to_user(&frame->extramask, &set->sig[1],
+                                  sizeof(frame->extramask)))
                        return -EFAULT;
        }
 
index 3b79e179ba3ae10a18c8be20a6e57edac35bb989..a21c85197295260766a7086688a243989dec1a04 100644 (file)
@@ -210,7 +210,7 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
                        (unsigned long)fp - sizeof(struct rt_sigframe), 16) - 8;
 
                if (save_i387_xstate(fp) < 0)
-                       err |= -1;
+                       return -EFAULT;
        } else
                frame = get_stack(ka, regs, sizeof(struct rt_sigframe)) - 8;
 
@@ -218,8 +218,7 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
                return -EFAULT;
 
        if (ka->sa.sa_flags & SA_SIGINFO) {
-               err |= copy_siginfo_to_user(&frame->info, info);
-               if (err)
+               if (copy_siginfo_to_user(&frame->info, info))
                        return -EFAULT;
        }