a73b42c5de3c68775753daf9b30e0fc1e206f04e
[openwrt/staging/pepe2k.git] /
1 From 4dc8d89faed9bb05f116fa1794fc955b14910386 Mon Sep 17 00:00:00 2001
2 From: Xiaoke Wang <xkernel.wang@foxmail.com>
3 Date: Sun, 20 Feb 2022 15:15:21 +0000
4 Subject: [PATCH] nvmem: meson-mx-efuse: replace unnecessary devm_kstrdup()
5
6 Replace unnecessary devm_kstrdup() so to avoid redundant memory allocation.
7
8 Suggested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
9 Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com>
10 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11 Link: https://lore.kernel.org/r/20220220151527.17216-8-srinivas.kandagatla@linaro.org
12 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 ---
14 drivers/nvmem/meson-mx-efuse.c | 3 +--
15 1 file changed, 1 insertion(+), 2 deletions(-)
16
17 --- a/drivers/nvmem/meson-mx-efuse.c
18 +++ b/drivers/nvmem/meson-mx-efuse.c
19 @@ -209,8 +209,7 @@ static int meson_mx_efuse_probe(struct p
20 if (IS_ERR(efuse->base))
21 return PTR_ERR(efuse->base);
22
23 - efuse->config.name = devm_kstrdup(&pdev->dev, drvdata->name,
24 - GFP_KERNEL);
25 + efuse->config.name = drvdata->name;
26 efuse->config.owner = THIS_MODULE;
27 efuse->config.dev = &pdev->dev;
28 efuse->config.priv = efuse;