diff options
| author | 2018-06-08 10:20:42 +0200 | |
|---|---|---|
| committer | 2018-06-08 10:20:42 +0200 | |
| commit | c1144d29f405ce1f4e6ede6482beb3d0d09750c6 (patch) | |
| tree | 0f9fe36a50005bae6ffe28a4f978e71273f5b1d1 /lib/bitmap.c | |
| parent | HID: core: fix hid_hw_open() comment (diff) | |
| parent | HID: alps: Fix some style in 't4_read_write_register()' (diff) | |
Merge branch 'for-4.18/alps' into for-linus
hid-alps driver cleanups wrt. t4_read_write_register() handling
from Christophe Jaillet
Diffstat (limited to 'lib/bitmap.c')
| -rw-r--r-- | lib/bitmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bitmap.c b/lib/bitmap.c index 9e498c77ed0e..a42eff7e8c48 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c @@ -607,7 +607,7 @@ static int __bitmap_parselist(const char *buf, unsigned int buflen, /* if no digit is after '-', it's wrong*/ if (at_start && in_range) return -EINVAL; - if (!(a <= b) || !(used_size <= group_size)) + if (!(a <= b) || group_size == 0 || !(used_size <= group_size)) return -EINVAL; if (b >= nmaskbits) return -ERANGE; |
