summaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-11-13 14:13:45 +0000
committerEduardo Valentin <edubezval@gmail.com>2019-01-02 04:47:10 -0800
commitac31f6e25d4e9e9dfda9c0621242036b291b7754 (patch)
tree0311ec6c1ce5c68de961af31f31999d17a3bdd9c /drivers/thermal
parent24f1c13fa5f1599c373c53783f74de8a639f7999 (diff)
downloadlinux-ac31f6e25d4e9e9dfda9c0621242036b291b7754.tar.bz2
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>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/armada_thermal.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index 92f67d40f2e9..4b36a3022849 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -545,20 +545,14 @@ static int armada_thermal_probe_legacy(struct platform_device *pdev,
priv->syscon = devm_regmap_init_mmio(&pdev->dev, base,
&armada_thermal_regmap_config);
- if (IS_ERR(priv->syscon))
- return PTR_ERR(priv->syscon);
-
- return 0;
+ return PTR_ERR_OR_ZERO(priv->syscon);
}
static int armada_thermal_probe_syscon(struct platform_device *pdev,
struct armada_thermal_priv *priv)
{
priv->syscon = syscon_node_to_regmap(pdev->dev.parent->of_node);
- if (IS_ERR(priv->syscon))
- return PTR_ERR(priv->syscon);
-
- return 0;
+ return PTR_ERR_OR_ZERO(priv->syscon);
}
static void armada_set_sane_name(struct platform_device *pdev,