All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] thermal: db8500: Fix checking return value of thermal_zone_device_register
@ 2013-03-12 15:42 Axel Lin
  2013-03-12 15:43 ` [PATCH 2/2] thermal: db8500: Fix missing mutex_unlock() in probe error paths Axel Lin
  2013-03-25  8:09 ` [PATCH 1/2] thermal: db8500: Fix checking return value of thermal_zone_device_register Zhang Rui
  0 siblings, 2 replies; 6+ messages in thread
From: Axel Lin @ 2013-03-12 15:42 UTC (permalink / raw)
  To: Zhang Rui; +Cc: Hongbo Zhang, Viresh Kumar, Francesco Lavra, linux-pm

thermal_zone_device_register() returns ERR_PTR on error, thus use
IS_ERR rather than IS_ERR_OR_NULL to check return value.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/thermal/db8500_thermal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/db8500_thermal.c b/drivers/thermal/db8500_thermal.c
index 61ce60a..6bdcec4 100644
--- a/drivers/thermal/db8500_thermal.c
+++ b/drivers/thermal/db8500_thermal.c
@@ -447,7 +447,7 @@ static int db8500_thermal_probe(struct platform_device *pdev)
 	pzone->therm_dev = thermal_zone_device_register("db8500_thermal_zone",
 		ptrips->num_trips, 0, pzone, &thdev_ops, NULL, 0, 0);
 
-	if (IS_ERR_OR_NULL(pzone->therm_dev)) {
+	if (IS_ERR(pzone->therm_dev)) {
 		dev_err(&pdev->dev, "Register thermal zone device failed.\n");
 		return PTR_ERR(pzone->therm_dev);
 	}
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-03-25  8:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-12 15:42 [PATCH 1/2] thermal: db8500: Fix checking return value of thermal_zone_device_register Axel Lin
2013-03-12 15:43 ` [PATCH 2/2] thermal: db8500: Fix missing mutex_unlock() in probe error paths Axel Lin
2013-03-13  8:13   ` Hongbo Zhang
2013-03-13  8:17     ` Axel Lin
2013-03-25  8:09   ` Zhang Rui
2013-03-25  8:09 ` [PATCH 1/2] thermal: db8500: Fix checking return value of thermal_zone_device_register Zhang Rui

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.