summaryrefslogtreecommitdiff
path: root/drivers/nvmem/meson-mx-efuse.c
diff options
context:
space:
mode:
authorXiaoke Wang <xkernel.wang@foxmail.com>2022-02-20 15:15:21 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-21 18:00:30 +0100
commit4dc8d89faed9bb05f116fa1794fc955b14910386 (patch)
treea0ec69cda3f50ed43ba499b1c13dd66eea0121f7 /drivers/nvmem/meson-mx-efuse.c
parent07ae4fde9efada7878e1383d6ccc7da70315ca23 (diff)
downloadlwn-4dc8d89faed9bb05f116fa1794fc955b14910386.tar.gz
lwn-4dc8d89faed9bb05f116fa1794fc955b14910386.zip
nvmem: meson-mx-efuse: replace unnecessary devm_kstrdup()
Replace unnecessary devm_kstrdup() so to avoid redundant memory allocation. Suggested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220220151527.17216-8-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem/meson-mx-efuse.c')
-rw-r--r--drivers/nvmem/meson-mx-efuse.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nvmem/meson-mx-efuse.c b/drivers/nvmem/meson-mx-efuse.c
index 07c9f38c1c60..13eb14316f46 100644
--- a/drivers/nvmem/meson-mx-efuse.c
+++ b/drivers/nvmem/meson-mx-efuse.c
@@ -209,8 +209,7 @@ static int meson_mx_efuse_probe(struct platform_device *pdev)
if (IS_ERR(efuse->base))
return PTR_ERR(efuse->base);
- efuse->config.name = devm_kstrdup(&pdev->dev, drvdata->name,
- GFP_KERNEL);
+ efuse->config.name = drvdata->name;
efuse->config.owner = THIS_MODULE;
efuse->config.dev = &pdev->dev;
efuse->config.priv = efuse;