pinctrl/rockchip: Switch to use devm_kasprintf_strarray()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 5 Nov 2021 12:42:30 +0000 (14:42 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 18 Nov 2021 16:40:09 +0000 (18:40 +0200)
commit069d7796c95be726655319ec2639aa0d75809add
tree0d1805f6f976478ee7ad0925ac08d90fba25cafc
parent0045028f318b58595596d7e53a88157923e83b0b
pinctrl/rockchip: 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: Heiko Stuebner <heiko@sntech.de>
drivers/pinctrl/pinctrl-rockchip.c