Skip to content

Commit

Permalink
drm/nouveau/hwmon: fix the initialization condition
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Martin Peres authored and Ben Skeggs committed Oct 16, 2012
1 parent 11573aa commit a5f5af8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpu/drm/nouveau/nouveau_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,8 +706,7 @@ nouveau_hwmon_init(struct drm_device *dev)
struct device *hwmon_dev;
int ret = 0;

if (!therm || !therm->temp_get || !therm->attr_get ||
!therm->attr_set || therm->temp_get(therm) < 0)
if (!therm || !therm->temp_get || !therm->attr_get || !therm->attr_set)
return -ENODEV;

hwmon_dev = hwmon_device_register(&dev->pdev->dev);
Expand Down

0 comments on commit a5f5af8

Please sign in to comment.