diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-02-06 04:29:43 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-03-25 23:59:31 -0400 |
commit | aa34efeddb6426c2d03214e65d6f31fbf7d413da (patch) | |
tree | 248954e3f4ca2b6ad267ca81c58010b1da0bfad3 | |
parent | 4ac1b1a29f5d73aad47dfecc3e66577e8b79ad5a (diff) |
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>
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_hwmon.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c index 4aff04fa483c..5e4ab58f4f6b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c +++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c | |||
@@ -587,18 +587,14 @@ nouveau_hwmon_init(struct drm_device *dev) | |||
587 | 587 | ||
588 | /* set the default attributes */ | 588 | /* set the default attributes */ |
589 | ret = sysfs_create_group(&hwmon_dev->kobj, &hwmon_default_attrgroup); | 589 | ret = sysfs_create_group(&hwmon_dev->kobj, &hwmon_default_attrgroup); |
590 | if (ret) { | 590 | if (ret) |
591 | if (ret) | 591 | goto error; |
592 | goto error; | ||
593 | } | ||
594 | 592 | ||
595 | /* if the card has a working thermal sensor */ | 593 | /* if the card has a working thermal sensor */ |
596 | if (therm->temp_get(therm) >= 0) { | 594 | if (therm->temp_get(therm) >= 0) { |
597 | ret = sysfs_create_group(&hwmon_dev->kobj, &hwmon_temp_attrgroup); | 595 | ret = sysfs_create_group(&hwmon_dev->kobj, &hwmon_temp_attrgroup); |
598 | if (ret) { | 596 | if (ret) |
599 | if (ret) | 597 | goto error; |
600 | goto error; | ||
601 | } | ||
602 | } | 598 | } |
603 | 599 | ||
604 | /* if the card has a pwm fan */ | 600 | /* if the card has a pwm fan */ |