diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2016-10-14 08:19:00 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-18 16:04:29 +0300 |
commit | ce3aeaf22c9f6d9dbbad00600b26ddd0263f8cbc (patch) | |
tree | dc4f7669ac33f4b578ae2ada081f902b45b8c626 /drivers | |
parent | 3f81678d8e4918788b17ab007f41b86aea030bdc (diff) | |
download | linux-ce3aeaf22c9f6d9dbbad00600b26ddd0263f8cbc.tar.xz |
[media] winbond-cir: Use kmalloc_array() in wbcir_tx()
A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kmalloc_array".
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/rc/winbond-cir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c index cdcd6e38b295..8c1f9225d358 100644 --- a/drivers/media/rc/winbond-cir.c +++ b/drivers/media/rc/winbond-cir.c @@ -658,7 +658,7 @@ wbcir_tx(struct rc_dev *dev, unsigned *b, unsigned count) unsigned i; unsigned long flags; - buf = kmalloc(count * sizeof(*b), GFP_KERNEL); + buf = kmalloc_array(count, sizeof(*b), GFP_KERNEL); if (!buf) return -ENOMEM; |