]> git.baikalelectronics.ru Git - kernel.git/commit
spi/topcliff-pch: Use kcalloc() in pch_spi_handle_dma()
authorMarkus Elfring <elfring@users.sourceforge.net>
Fri, 13 Jan 2017 14:25:22 +0000 (15:25 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 17 Jan 2017 18:35:06 +0000 (18:35 +0000)
commit1030824747ea1d4dafa9ac1a88571e5f15f822d4
tree54e4a425c15f97397571fb1f3199ac9d68e2e59a
parentb123aaae0dea3971439af998c11e3cf55b00af62
spi/topcliff-pch: Use kcalloc() in pch_spi_handle_dma()

* Multiplications for the size determination of memory allocations
  indicated that array data structures should be processed.
  Thus use the corresponding function "kcalloc".

  This issue was detected by using the Coccinelle software.

* Replace the specification of a data structure by pointer dereferences
  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-topcliff-pch.c