Commit aa34efed authored by Dan Carpenter's avatar Dan Carpenter Committed by Ben Skeggs

drm/nouveau/hwmon: remove some redundant checks

No need to check "ret" twice in a row.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 4ac1b1a2
...@@ -587,19 +587,15 @@ nouveau_hwmon_init(struct drm_device *dev) ...@@ -587,19 +587,15 @@ nouveau_hwmon_init(struct drm_device *dev)
/* set the default attributes */ /* set the default attributes */
ret = sysfs_create_group(&hwmon_dev->kobj, &hwmon_default_attrgroup); ret = sysfs_create_group(&hwmon_dev->kobj, &hwmon_default_attrgroup);
if (ret) {
if (ret) if (ret)
goto error; goto error;
}
/* if the card has a working thermal sensor */ /* if the card has a working thermal sensor */
if (therm->temp_get(therm) >= 0) { if (therm->temp_get(therm) >= 0) {
ret = sysfs_create_group(&hwmon_dev->kobj, &hwmon_temp_attrgroup); ret = sysfs_create_group(&hwmon_dev->kobj, &hwmon_temp_attrgroup);
if (ret) {
if (ret) if (ret)
goto error; goto error;
} }
}
/* if the card has a pwm fan */ /* if the card has a pwm fan */
/*XXX: incorrect, need better detection for this, some boards have /*XXX: incorrect, need better detection for this, some boards have
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment