提交 4dc8d89f 编写于 作者: X Xiaoke Wang 提交者: Greg Kroah-Hartman

nvmem: meson-mx-efuse: replace unnecessary devm_kstrdup()

Replace unnecessary devm_kstrdup() so to avoid redundant memory allocation.
Suggested-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: NXiaoke Wang <xkernel.wang@foxmail.com>
Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220220151527.17216-8-srinivas.kandagatla@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 07ae4fde
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册