aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-03-12 11:42:20 -0400
committerZhang Rui <rui.zhang@intel.com>2013-03-26 10:07:52 -0400
commitf534e9bf8074ca8c258a1ce0e5224372298976f9 (patch)
tree61e2b4e67e197351af6a155f66ab4e19c762ac65
parentbde00663098db4d6a25681351ffa4a87eff3d0b4 (diff)
thermal: db8500: Fix checking return value of thermal_zone_device_register
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> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
-rw-r--r--drivers/thermal/db8500_thermal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/db8500_thermal.c b/drivers/thermal/db8500_thermal.c
index 61ce60a35921..6bdcec474fb1 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)
447 pzone->therm_dev = thermal_zone_device_register("db8500_thermal_zone", 447 pzone->therm_dev = thermal_zone_device_register("db8500_thermal_zone",
448 ptrips->num_trips, 0, pzone, &thdev_ops, NULL, 0, 0); 448 ptrips->num_trips, 0, pzone, &thdev_ops, NULL, 0, 0);
449 449
450 if (IS_ERR_OR_NULL(pzone->therm_dev)) { 450 if (IS_ERR(pzone->therm_dev)) {
451 dev_err(&pdev->dev, "Register thermal zone device failed.\n"); 451 dev_err(&pdev->dev, "Register thermal zone device failed.\n");
452 return PTR_ERR(pzone->therm_dev); 452 return PTR_ERR(pzone->therm_dev);
453 } 453 }