mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
drm/nouveau/hwmon: remove some redundant checks
No need to check "ret" twice in a row. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
4ac1b1a29f
commit
aa34efeddb
1 changed files with 4 additions and 8 deletions
|
@ -587,18 +587,14 @@ nouveau_hwmon_init(struct drm_device *dev)
|
|||
|
||||
/* set the default attributes */
|
||||
ret = sysfs_create_group(&hwmon_dev->kobj, &hwmon_default_attrgroup);
|
||||
if (ret) {
|
||||
if (ret)
|
||||
goto error;
|
||||
}
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
/* if the card has a working thermal sensor */
|
||||
if (therm->temp_get(therm) >= 0) {
|
||||
ret = sysfs_create_group(&hwmon_dev->kobj, &hwmon_temp_attrgroup);
|
||||
if (ret) {
|
||||
if (ret)
|
||||
goto error;
|
||||
}
|
||||
if (ret)
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* if the card has a pwm fan */
|
||||
|
|
Loading…
Reference in a new issue