|
@@ -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;
|
|
|
}
|
|
|
|