On Tue, Dec 5, 2017 at 12:52 AM, Guenter Roeck <li...@roeck-us.net> 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.

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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to