Message ID | 20190919214058.8243-1-pmamonov@gmail.com (mailing list archive) |
---|---|
State | RFC, archived |
Headers | show |
Series | [RFC] thermal: Fix broken registration if a sensor OF node is missing | expand |
diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index dc5093be553e..34b0cc173f4a 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c @@ -493,7 +493,7 @@ thermal_zone_of_sensor_register(struct device *dev, int sensor_id, void *data, if (!dev || !dev->of_node) { of_node_put(np); - return ERR_PTR(-EINVAL); + return ERR_PTR(-ENODEV); } sensor_np = of_node_get(dev->of_node);