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: 841fd94c43 ("soc/tegra: flowctrl: Add basic platform driver")

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
Christophe Jaillet 2017-04-11 05:40:41 +02:00 committed by Thierry Reding
parent e7149a7a3f
commit da1dbec1be

View File

@ -157,7 +157,7 @@ static int tegra_flowctrl_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
tegra_flowctrl_base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(tegra_flowctrl_base))
return PTR_ERR(base);
return PTR_ERR(tegra_flowctrl_base);
iounmap(base);