]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: caam - Use kmalloc_array() in ahash_setkey()
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 15 Sep 2016 09:20:09 +0000 (11:20 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 22 Sep 2016 10:27:39 +0000 (18:27 +0800)
commit49686394b8f52ddf292391122173f09fe6e348e0
treec29731c1b4b964dbb1298f6c379c956cc0fb7766
parent4224cf0ccc9635a19e88c2a4e0ddd5ce5959ff70
crypto: caam - Use kmalloc_array() in ahash_setkey()

* 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.

* Replace the specification of a data type by a pointer dereference
  to make the corresponding size determination a bit safer according to
  the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamhash.c