s390/compat,signal: fix return value of copy_siginfo_(to|from)_user32()
[sfrench/cifs-2.6.git] / arch / s390 / kernel / compat_signal.c
index 1389b637dae55018e3eab8b18dd3f44e9440e078..adaa9e9478d83fb77a2e91a41de0934f84acfb66 100644 (file)
@@ -99,7 +99,7 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
                        break;
                }
        }
-       return err;
+       return err ? -EFAULT : 0;
 }
 
 int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
@@ -148,7 +148,7 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
                        break;
                }
        }
-       return err;
+       return err ? -EFAULT : 0;
 }
 
 static int save_sigregs32(struct pt_regs *regs, _sigregs32 __user *sregs)