Message ID | 20190624092325.180202592@linuxfoundation.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | None | expand |
diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c index c22dc1e07911..c38883f748a1 100644 --- a/drivers/hwmon/hwmon.c +++ b/drivers/hwmon/hwmon.c @@ -633,7 +633,7 @@ __hwmon_device_register(struct device *dev, const char *name, void *drvdata, if (err) goto free_hwmon; - if (dev && chip && chip->ops->read && + if (dev && dev->of_node && chip && chip->ops->read && chip->info[0]->type == hwmon_chip && (chip->info[0]->config[0] & HWMON_C_REGISTER_TZ)) { const struct hwmon_channel_info **info = chip->info;