提交 da1dbec1 编写于 作者: C Christophe Jaillet 提交者: Thierry Reding

soc/tegra: flowctrl: Fix error handling

It is likely that returning returned by 'devm_ioremap_resource()' is
expected here instead of something related to 'base' which should be a
valid pointer at this point.

Fixes: 841fd94c ("soc/tegra: flowctrl: Add basic platform driver")
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: NJon Hunter <jonathanh@nvidia.com>
Signed-off-by: NThierry Reding <treding@nvidia.com>
上级 e7149a7a
...@@ -157,7 +157,7 @@ static int tegra_flowctrl_probe(struct platform_device *pdev) ...@@ -157,7 +157,7 @@ static int tegra_flowctrl_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
tegra_flowctrl_base = devm_ioremap_resource(&pdev->dev, res); tegra_flowctrl_base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(tegra_flowctrl_base)) if (IS_ERR(tegra_flowctrl_base))
return PTR_ERR(base); return PTR_ERR(tegra_flowctrl_base);
iounmap(base); iounmap(base);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册