浏览代码

drm/nouveau/hwmon: fix the initialization condition

Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres 12 年之前
父节点
当前提交
a5f5af8698
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      drivers/gpu/drm/nouveau/nouveau_pm.c

+ 1 - 2
drivers/gpu/drm/nouveau/nouveau_pm.c

@@ -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);