Commit da1dbec1 authored by Christophe Jaillet's avatar Christophe Jaillet Committed by 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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: default avatarJon Hunter <jonathanh@nvidia.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment