diff options
| -rw-r--r-- | arch/mn10300/include/asm/uaccess.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/mn10300/include/asm/uaccess.h b/arch/mn10300/include/asm/uaccess.h index 679dee0bbd08..3d6e60dad9d9 100644 --- a/arch/mn10300/include/asm/uaccess.h +++ b/arch/mn10300/include/asm/uaccess.h | |||
| @@ -160,9 +160,10 @@ struct __large_struct { unsigned long buf[100]; }; | |||
| 160 | 160 | ||
| 161 | #define __get_user_check(x, ptr, size) \ | 161 | #define __get_user_check(x, ptr, size) \ |
| 162 | ({ \ | 162 | ({ \ |
| 163 | const __typeof__(ptr) __guc_ptr = (ptr); \ | ||
| 163 | int _e; \ | 164 | int _e; \ |
| 164 | if (likely(__access_ok((unsigned long) (ptr), (size)))) \ | 165 | if (likely(__access_ok((unsigned long) __guc_ptr, (size)))) \ |
| 165 | _e = __get_user_nocheck((x), (ptr), (size)); \ | 166 | _e = __get_user_nocheck((x), __guc_ptr, (size)); \ |
| 166 | else { \ | 167 | else { \ |
| 167 | _e = -EFAULT; \ | 168 | _e = -EFAULT; \ |
| 168 | (x) = (__typeof__(x))0; \ | 169 | (x) = (__typeof__(x))0; \ |
