diff options
Diffstat (limited to 'arch/mips/kernel/signal32.c')
-rw-r--r-- | arch/mips/kernel/signal32.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index 1905a419aa46..3d60f7750fa8 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c | |||
@@ -85,8 +85,9 @@ static int protected_save_fp_context32(struct sigcontext32 __user *sc) | |||
85 | int err; | 85 | int err; |
86 | while (1) { | 86 | while (1) { |
87 | lock_fpu_owner(); | 87 | lock_fpu_owner(); |
88 | own_fpu_inatomic(1); | 88 | err = own_fpu_inatomic(1); |
89 | err = save_fp_context32(sc); /* this might fail */ | 89 | if (!err) |
90 | err = save_fp_context32(sc); /* this might fail */ | ||
90 | unlock_fpu_owner(); | 91 | unlock_fpu_owner(); |
91 | if (likely(!err)) | 92 | if (likely(!err)) |
92 | break; | 93 | break; |
@@ -105,8 +106,9 @@ static int protected_restore_fp_context32(struct sigcontext32 __user *sc) | |||
105 | int err, tmp __maybe_unused; | 106 | int err, tmp __maybe_unused; |
106 | while (1) { | 107 | while (1) { |
107 | lock_fpu_owner(); | 108 | lock_fpu_owner(); |
108 | own_fpu_inatomic(0); | 109 | err = own_fpu_inatomic(0); |
109 | err = restore_fp_context32(sc); /* this might fail */ | 110 | if (!err) |
111 | err = restore_fp_context32(sc); /* this might fail */ | ||
110 | unlock_fpu_owner(); | 112 | unlock_fpu_owner(); |
111 | if (likely(!err)) | 113 | if (likely(!err)) |
112 | break; | 114 | break; |