diff options
| author | 2015-06-09 23:37:31 -0700 | |
|---|---|---|
| committer | 2015-06-09 23:37:31 -0700 | |
| commit | 63e63a1981c7247fea41ce97b3144befc8f2fb7b (patch) | |
| tree | 74a5708579661a741b6c62096530e68aee949273 /kernel/compat.c | |
| parent | mmc: omap_hsmmc: Change wake-up interrupt to use generic wakeirq (diff) | |
| parent | serial: 8250_omap: Move wake-up interrupt to generic wakeirq (diff) | |
Merge branch 'wakeirq-8250' into omap-for-v4.2/wakeirq-v2
Diffstat (limited to 'kernel/compat.c')
| -rw-r--r-- | kernel/compat.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/compat.c b/kernel/compat.c index 24f00610c575..333d364be29d 100644 --- a/kernel/compat.c +++ b/kernel/compat.c @@ -912,7 +912,8 @@ long compat_get_bitmap(unsigned long *mask, const compat_ulong_t __user *umask, * bitmap. We must however ensure the end of the * kernel bitmap is zeroed. */ - if (nr_compat_longs-- > 0) { + if (nr_compat_longs) { + nr_compat_longs--; if (__get_user(um, umask)) return -EFAULT; } else { @@ -954,7 +955,8 @@ long compat_put_bitmap(compat_ulong_t __user *umask, unsigned long *mask, * We dont want to write past the end of the userspace * bitmap. */ - if (nr_compat_longs-- > 0) { + if (nr_compat_longs) { + nr_compat_longs--; if (__put_user(um, umask)) return -EFAULT; } |
