[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <03ee62f0b9919535a1be02f72fe8153255a7fda0.1333101989.git.len.brown@intel.com>
Date: Fri, 30 Mar 2012 06:13:23 -0400
From: Len Brown <lenb@...nel.org>
To: linux-acpi@...r.kernel.org, linux-pm@...ts.linux-foundation.org
Cc: linux-kernel@...r.kernel.org,
Dan Carpenter <dan.carpenter@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Len Brown <len.brown@...el.com>
Subject: [PATCH 20/76] thermal: spear13xx: checking for NULL instead of IS_ERR()
From: Dan Carpenter <dan.carpenter@...cle.com>
thermal_zone_device_register() never returns NULL, on error it returns and
ERR_PTR().
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
Reviewed-by: Viresh Kumar <viresh.kumar@...com>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@...com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Len Brown <len.brown@...el.com>
---
drivers/thermal/spear_thermal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/thermal/spear_thermal.c b/drivers/thermal/spear_thermal.c
index be94413..c2e32df 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;
}
--
1.7.10.rc2.19.gfae9d
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists