drm/nouveau/hwmon: fix the initialization condition

Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Martin Peres 2012-10-04 00:28:21 +02:00 committed by Ben Skeggs
parent 11573aa788
commit a5f5af8698
1 changed files with 1 additions and 2 deletions

View File

@ -706,8 +706,7 @@ nouveau_hwmon_init(struct drm_device *dev)
struct device *hwmon_dev; struct device *hwmon_dev;
int ret = 0; int ret = 0;
if (!therm || !therm->temp_get || !therm->attr_get || if (!therm || !therm->temp_get || !therm->attr_get || !therm->attr_set)
!therm->attr_set || therm->temp_get(therm) < 0)
return -ENODEV; return -ENODEV;
hwmon_dev = hwmon_device_register(&dev->pdev->dev); hwmon_dev = hwmon_device_register(&dev->pdev->dev);