提交 0e3ac20d 编写于 作者: D Devendra Naga 提交者: Linus Walleij

pinctrl/pinctrl-u300: remove unneeded devm_kfree call

the allocated memory will be destroyed at the driver unload time,
automatically if driver uses the devm_ functions, so no need of
doing devm_kfree at the error path
Signed-off-by: NDevendra Naga <develkernel412222@gmail.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 c43ba800
...@@ -1121,10 +1121,8 @@ static int __devinit u300_pmx_probe(struct platform_device *pdev) ...@@ -1121,10 +1121,8 @@ static int __devinit u300_pmx_probe(struct platform_device *pdev)
upmx->dev = &pdev->dev; upmx->dev = &pdev->dev;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) { if (!res)
ret = -ENOENT; return -ENOENT;
goto out_no_resource;
}
upmx->phybase = res->start; upmx->phybase = res->start;
upmx->physize = resource_size(res); upmx->physize = resource_size(res);
...@@ -1165,8 +1163,6 @@ static int __devinit u300_pmx_probe(struct platform_device *pdev) ...@@ -1165,8 +1163,6 @@ static int __devinit u300_pmx_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
out_no_memregion: out_no_memregion:
release_mem_region(upmx->phybase, upmx->physize); release_mem_region(upmx->phybase, upmx->physize);
out_no_resource:
devm_kfree(&pdev->dev, upmx);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册