From: Martin Peres Date: Wed, 3 Oct 2012 22:28:21 +0000 (+0200) Subject: drm/nouveau/hwmon: fix the initialization condition X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a5f5af8698a5cb3a68608a40a8782bdf8263cb97;p=linux-beck.git drm/nouveau/hwmon: fix the initialization condition Signed-off-by: Martin Peres Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c index b9d5335df742..47677e3f8d7e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_pm.c +++ b/drivers/gpu/drm/nouveau/nouveau_pm.c @@ -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);