diff options
author | 2018-08-20 18:05:17 +0200 | |
---|---|---|
committer | 2018-08-20 18:05:17 +0200 | |
commit | 415d2b3392d7a80903e0f97f051201aa02bf20e9 (patch) | |
tree | 47492d2386a0e7f00ef645313cb44ae4960b7e7e /sound/core/pcm_native.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 'sound/core/pcm_native.c')
-rw-r--r-- | sound/core/pcm_native.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 04c6301394d0..cecc79772c94 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -3072,7 +3072,7 @@ static ssize_t snd_pcm_readv(struct kiocb *iocb, struct iov_iter *to) if (!frame_aligned(runtime, to->iov->iov_len)) return -EINVAL; frames = bytes_to_samples(runtime, to->iov->iov_len); - bufs = kmalloc(sizeof(void *) * to->nr_segs, GFP_KERNEL); + bufs = kmalloc_array(to->nr_segs, sizeof(void *), GFP_KERNEL); if (bufs == NULL) return -ENOMEM; for (i = 0; i < to->nr_segs; ++i) @@ -3107,7 +3107,7 @@ static ssize_t snd_pcm_writev(struct kiocb *iocb, struct iov_iter *from) !frame_aligned(runtime, from->iov->iov_len)) return -EINVAL; frames = bytes_to_samples(runtime, from->iov->iov_len); - bufs = kmalloc(sizeof(void *) * from->nr_segs, GFP_KERNEL); + bufs = kmalloc_array(from->nr_segs, sizeof(void *), GFP_KERNEL); if (bufs == NULL) return -ENOMEM; for (i = 0; i < from->nr_segs; ++i) |