]> git.karo-electronics.de Git - karo-tx-linux.git/commit
clk: hisilicon: Use devm_kmalloc_array() in hisi_clk_alloc()
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 18 Apr 2017 08:15:19 +0000 (10:15 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Wed, 19 Apr 2017 17:45:12 +0000 (10:45 -0700)
commit8d9bdc46c780325414af7f09827c78c69f9b1e3d
treefb0894a64de125001a09da0180443f782e223f05
parent7b9bae176a5c63fb467149174c11a48f3b3c5947
clk: hisilicon: Use devm_kmalloc_array() in hisi_clk_alloc()

* A multiplication for the size determination of a memory allocation
  indicated that an array data structure should be processed.
  Thus use the corresponding function "devm_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: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/hisilicon/clk.c