mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 17:59:32 +00:00
thermal: armada: Use PTR_ERR_OR_ZERO in armada_thermal_probe_legacy()
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
This commit is contained in:
parent
24f1c13fa5
commit
ac31f6e25d
1 changed files with 2 additions and 8 deletions
|
@ -545,20 +545,14 @@ static int armada_thermal_probe_legacy(struct platform_device *pdev,
|
||||||
|
|
||||||
priv->syscon = devm_regmap_init_mmio(&pdev->dev, base,
|
priv->syscon = devm_regmap_init_mmio(&pdev->dev, base,
|
||||||
&armada_thermal_regmap_config);
|
&armada_thermal_regmap_config);
|
||||||
if (IS_ERR(priv->syscon))
|
return PTR_ERR_OR_ZERO(priv->syscon);
|
||||||
return PTR_ERR(priv->syscon);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int armada_thermal_probe_syscon(struct platform_device *pdev,
|
static int armada_thermal_probe_syscon(struct platform_device *pdev,
|
||||||
struct armada_thermal_priv *priv)
|
struct armada_thermal_priv *priv)
|
||||||
{
|
{
|
||||||
priv->syscon = syscon_node_to_regmap(pdev->dev.parent->of_node);
|
priv->syscon = syscon_node_to_regmap(pdev->dev.parent->of_node);
|
||||||
if (IS_ERR(priv->syscon))
|
return PTR_ERR_OR_ZERO(priv->syscon);
|
||||||
return PTR_ERR(priv->syscon);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void armada_set_sane_name(struct platform_device *pdev,
|
static void armada_set_sane_name(struct platform_device *pdev,
|
||||||
|
|
Loading…
Reference in a new issue