Browse Source

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

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs 11 years ago
parent
commit
dcd9262b3b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/gpu/drm/nouveau/core/subdev/therm/base.c

+ 1 - 1
drivers/gpu/drm/nouveau/core/subdev/therm/base.c

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