diff options
author | Claudiu Beznea <claudiu.beznea@microchip.com> | 2023-02-03 14:27:14 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2023-02-06 12:11:51 +0100 |
commit | 1c4e5c470a56f7f7c649c0c70e603abc1eab15c4 (patch) | |
tree | 745c9258a797802b4dc99d2f0345922b1a33b7db /drivers/pinctrl/pinctrl-at91.c | |
parent | pinctrl: qcom: add the tlmm driver sa8775p platforms (diff) | |
download | linux-1c4e5c470a56f7f7c649c0c70e603abc1eab15c4.tar.xz linux-1c4e5c470a56f7f7c649c0c70e603abc1eab15c4.zip |
pinctrl: at91: use devm_kasprintf() to avoid potential leaks
Use devm_kasprintf() instead of kasprintf() to avoid any potential
leaks. At the moment drivers have no remove functionality thus
there is no need for fixes tag.
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20230203132714.1931596-1-claudiu.beznea@microchip.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-at91.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-at91.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 9a066355fd27..735c501e7a06 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -1875,7 +1875,7 @@ static int at91_gpio_probe(struct platform_device *pdev) } for (i = 0; i < chip->ngpio; i++) - names[i] = kasprintf(GFP_KERNEL, "pio%c%d", alias_idx + 'A', i); + names[i] = devm_kasprintf(&pdev->dev, GFP_KERNEL, "pio%c%d", alias_idx + 'A', i); chip->names = (const char *const *)names; |