@@ -99,14 +99,14 @@ static struct thermal_trip *thermal_of_trips_init(struct device_node *np, int *n
struct device_node *trips __free(device_node) = of_get_child_by_name(np, "trips");
if (!trips) {
- pr_err("Failed to find 'trips' node\n");
- return ERR_PTR(-EINVAL);
+ pr_debug("Failed to find 'trips' node\n");
+ return ERR_PTR(-ENXIO);
}
count = of_get_child_count(trips);
if (!count) {
- pr_err("No trip point defined\n");
- return ERR_PTR(-EINVAL);
+ pr_debug("No trip point defined\n");
+ return ERR_PTR(-ENXIO);
}
struct thermal_trip *tt __free(kfree) = kzalloc(sizeof(*tt) * count, GFP_KERNEL);
@@ -386,9 +386,15 @@ static struct thermal_zone_device *thermal_of_zone_register(struct device_node *
trips = thermal_of_trips_init(np, &ntrips);
if (IS_ERR(trips)) {
- pr_err("Failed to find trip points for %pOFn id=%d\n", sensor, id);
- ret = PTR_ERR(trips);
- goto out_of_node_put;
+ if (PTR_ERR(trips) != -ENXIO) {
+ pr_err("Failed to find trip points for %pOFn id=%d\n", sensor, id);
+ ret = PTR_ERR(trips);
+ goto out_of_node_put;
+ }
+
+ pr_warn("Failed to find trip points for %pOFn id=%d\n", sensor, id);
+ trips = NULL;
+ ntrips = 0;
}
ret = thermal_of_monitor_init(np, &delay, &pdelay);