]> git.karo-electronics.de Git - karo-tx-linux.git/commit
spi/ppc4xx: Use kcalloc() in spi_ppc4xx_of_probe()
authorMarkus Elfring <elfring@users.sourceforge.net>
Fri, 13 Jan 2017 13:30:43 +0000 (14:30 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 17 Jan 2017 18:34:25 +0000 (18:34 +0000)
commit797236f10a095a1742373bca5f284c5ec8afb446
treef53c25716f83d86d0cfea7387cf22ba7373fcfff
parentffcaef5ac27b62b480b94036615b3ae4f1b725fe
spi/ppc4xx: Use kcalloc() in spi_ppc4xx_of_probe()

* A multiplication for the size determination of a memory allocation
  indicated that an array data structure should be processed.
  Thus reuse the corresponding function "kcalloc".

  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: Mark Brown <broonie@kernel.org>
drivers/spi/spi-ppc4xx.c