提交 a5f5af86 编写于 作者: M Martin Peres 提交者: Ben Skeggs

drm/nouveau/hwmon: fix the initialization condition

Signed-off-by: NMartin Peres <martin.peres@labri.fr>
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 11573aa7
......@@ -706,8 +706,7 @@ nouveau_hwmon_init(struct drm_device *dev)
struct device *hwmon_dev;
int ret = 0;
if (!therm || !therm->temp_get || !therm->attr_get ||
!therm->attr_set || therm->temp_get(therm) < 0)
if (!therm || !therm->temp_get || !therm->attr_get || !therm->attr_set)
return -ENODEV;
hwmon_dev = hwmon_device_register(&dev->pdev->dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册