summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/spear_thermal.c
diff options
context:
space:
mode:
authorDan Carpenter2012-03-21 20:55:04 +0100
committerLen Brown2012-03-22 06:07:22 +0100
commit03ee62f0b9919535a1be02f72fe8153255a7fda0 (patch)
tree7c643687a8901ed38fca4f2a6ef046abcd3aa3da /drivers/thermal/spear_thermal.c
parentthermal/spear_thermal: replace readl/writel with lighter _relaxed variants (diff)
downloadkernel-qcow2-linux-03ee62f0b9919535a1be02f72fe8153255a7fda0.tar.gz
kernel-qcow2-linux-03ee62f0b9919535a1be02f72fe8153255a7fda0.tar.xz
kernel-qcow2-linux-03ee62f0b9919535a1be02f72fe8153255a7fda0.zip
thermal: spear13xx: checking for NULL instead of IS_ERR()
thermal_zone_device_register() never returns NULL, on error it returns and ERR_PTR(). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Viresh Kumar <viresh.kumar@st.com> Reviewed-by: Vincenzo Frascino <vincenzo.frascino@st.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/thermal/spear_thermal.c')
-rw-r--r--drivers/thermal/spear_thermal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thermal/spear_thermal.c b/drivers/thermal/spear_thermal.c
index be94413b95a3..c2e32df3b164 100644
--- a/drivers/thermal/spear_thermal.c
+++ b/drivers/thermal/spear_thermal.c
@@ -149,9 +149,9 @@ static int spear_thermal_probe(struct platform_device *pdev)
spear_thermal = thermal_zone_device_register("spear_thermal", 0,
stdev, &ops, 0, 0, 0, 0);
- if (!spear_thermal) {
+ if (IS_ERR(spear_thermal)) {
dev_err(&pdev->dev, "thermal zone device is NULL\n");
- ret = -EINVAL;
+ ret = PTR_ERR(spear_thermal);
goto disable_clk;
}