[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_0589E3FF08A4905922F78BC38602361C5505@qq.com>
Date: Mon, 17 Jan 2022 10:56:21 +0800
From: xkernel.wang@...mail.com
To: martin.blumenstingl@...glemail.com, srinivas.kandagatla@...aro.org,
narmstrong@...libre.com, khilman@...libre.com
Cc: jbrunet@...libre.com, linux-arm-kernel@...ts.infradead.org,
linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org,
Xiaoke Wang <xkernel.wang@...mail.com>
Subject: [PATCH v2] nvmem: meson-mx-efuse: replace unnecessary devm_kstrdup()
From: Xiaoke Wang <xkernel.wang@...mail.com>
Replace unnecessary devm_kstrdup() so to avoid redundant memory allocation.
Suggested-by: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
Signed-off-by: Xiaoke Wang <xkernel.wang@...mail.com>
---
Changelogs:
Simplify the patch to replace unnecessary devm_kstrdup().
drivers/nvmem/meson-mx-efuse.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/nvmem/meson-mx-efuse.c b/drivers/nvmem/meson-mx-efuse.c
index 07c9f38..13eb143 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;
--
Powered by blists - more mailing lists