pinctrl: armada-37xx: Switch to use devm_kasprintf_strarray()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 5 Nov 2021 12:42:35 +0000 (14:42 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 18 Nov 2021 16:40:09 +0000 (18:40 +0200)
commitb32b195d7f021f4c66a3de7b34ee648e56b824cd
treec2413bee0fdf2b50eb56f318baf071fe9c11354e
parent06cb10ea0cd5c5f4db9627a33ab47fec32cb5960
pinctrl: armada-37xx: Switch to use devm_kasprintf_strarray()

Since we have a generic helper, switch the module to use it.

As a side effect, add check for the memory allocation failures and
cleanup it either in error case or when driver is unloading.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com>
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c