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:
parent
11573aa788
commit
a5f5af8698
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue