reset: sti: Use devm_kcalloc() in syscfg_reset_controller_register()
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 26 Apr 2017 07:50:34 +0000 (09:50 +0200)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 15 May 2017 06:59:08 +0000 (08:59 +0200)
commitaa248927d8dbaa35e0fb920f30d0da2164dc7a98
tree550a86ed89e7cd077efe303485703d46936ce58d
parent2ea659a9ef488125eb46da6eb571de5eae5c43f6
reset: sti: Use devm_kcalloc() in syscfg_reset_controller_register()

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

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

* Delete the local variable "size" which became unnecessary with
  this refactoring.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/reset/sti/reset-syscfg.c