Skip to content

Commit

Permalink
drm/nouveau/therm: check for sensor presence with requested mode, not…
Browse files Browse the repository at this point in the history
… current

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Mar 26, 2014
1 parent cbc53c1 commit dcd9262
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/core/subdev/therm/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit dcd9262

Please sign in to comment.