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

Commit dcd9262b authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/therm: check for sensor presence with requested mode, not current



Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent cbc53c16
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ nouveau_therm_fan_mode(struct nouveau_therm *therm, int mode)

	/* do not allow automatic fan management if the thermal sensor is
	 * not available */
	if (priv->mode == NOUVEAU_THERM_CTRL_AUTO && therm->temp_get(therm) < 0)
	if (mode == NOUVEAU_THERM_CTRL_AUTO && therm->temp_get(therm) < 0)
		return -EINVAL;

	if (priv->mode == mode)