pinctrl: st: Switch to use devm_kasprintf_strarray()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 5 Nov 2021 12:42:40 +0000 (14:42 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 18 Nov 2021 16:40:10 +0000 (18:40 +0200)
commit3956d6c85f26b5dd59cc6d3bf85a6a7341c68518
treea33ab71bc1dbb3935ac3cf25ccb103933e6713a9
parent3d4d3e0a7d67a9d49fb661c6ea3b51fc3696030f
pinctrl: st: 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: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-st.c