From f534e9bf8074ca8c258a1ce0e5224372298976f9 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Tue, 12 Mar 2013 15:42:20 +0000 Subject: [PATCH] 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 Signed-off-by: Zhang Rui --- 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 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) 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); } -- 2.39.5