diff options
author | 2018-08-20 18:05:17 +0200 | |
---|---|---|
committer | 2018-08-20 18:05:17 +0200 | |
commit | 415d2b3392d7a80903e0f97f051201aa02bf20e9 (patch) | |
tree | 47492d2386a0e7f00ef645313cb44ae4960b7e7e /drivers/iio/adc/max1363.c | |
parent | HID: hiddev: fix potential Spectre v1 (diff) | |
parent | HID: cougar: Add support for the Cougar 500k Gaming Keyboard (diff) | |
download | linux-dev-415d2b3392d7a80903e0f97f051201aa02bf20e9.tar.xz linux-dev-415d2b3392d7a80903e0f97f051201aa02bf20e9.zip |
Merge branch 'for-4.19/cougar' into for-linus
New device support for hid-cougar
Diffstat (limited to 'drivers/iio/adc/max1363.c')
-rw-r--r-- | drivers/iio/adc/max1363.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/iio/adc/max1363.c b/drivers/iio/adc/max1363.c index 7f1848dac9bf..7fb4f525714a 100644 --- a/drivers/iio/adc/max1363.c +++ b/drivers/iio/adc/max1363.c @@ -1453,8 +1453,10 @@ static int max1363_alloc_scan_masks(struct iio_dev *indio_dev) int i; masks = devm_kzalloc(&indio_dev->dev, - BITS_TO_LONGS(MAX1363_MAX_CHANNELS) * sizeof(long) * - (st->chip_info->num_modes + 1), GFP_KERNEL); + array3_size(BITS_TO_LONGS(MAX1363_MAX_CHANNELS), + sizeof(long), + st->chip_info->num_modes + 1), + GFP_KERNEL); if (!masks) return -ENOMEM; |