Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5f5af86 authored by Martin Peres's avatar Martin Peres Committed by Ben Skeggs
Browse files

drm/nouveau/hwmon: fix the initialization condition

parent 11573aa7
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -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);