aboutsummaryrefslogtreecommitdiff
path: root/arch/i386/math-emu/fpu_entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/math-emu/fpu_entry.c')
-rw-r--r--arch/i386/math-emu/fpu_entry.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/i386/math-emu/fpu_entry.c b/arch/i386/math-emu/fpu_entry.c
index d93f16ef828f..ddf8fa3bbd01 100644
--- a/arch/i386/math-emu/fpu_entry.c
+++ b/arch/i386/math-emu/fpu_entry.c
@@ -742,7 +742,8 @@ int save_i387_soft(void *s387, struct _fpstate __user * buf)
S387->fcs &= ~0xf8000000;
S387->fos |= 0xffff0000;
#endif /* PECULIAR_486 */
- __copy_to_user(d, &S387->cwd, 7*4);
+ if (__copy_to_user(d, &S387->cwd, 7*4))
+ return -1;
RE_ENTRANT_CHECK_ON;
d += 7*4;