On 12/05/2017 12:31 AM, Linus Walleij wrote:
On Tue, Dec 5, 2017 at 12:52 AM, Guenter Roeck <[email protected]> wrote:

-     devm_thermal_zone_of_sensor_register(&hwdev->dev, index, tdata,
-                                          &hwmon_thermal_ops);
+     tzd = devm_thermal_zone_of_sensor_register(&hwdev->dev, index, tdata,
+                                                &hwmon_thermal_ops);
+     if (IS_ERR(tzd))
+             return PTR_ERR(tzd);

This won't work because devm_thermal_zone_of_sensor_register() returns
-ENODEV if CONFIG_THERMAL_OF is disabled. We'll have to check for
-EPROBE_DEFER and only return this specific error, but ignore all others.

Sounds more like we should ignore -ENODEV and respect all other
errors? It will be more robust if some code changes and some
new error code appears again.


Agreed, makes sense.

Guenter

I will cook a patch like so.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to