]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/nouveau/hwmon: remove some redundant checks
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 6 Feb 2014 09:29:43 +0000 (12:29 +0300)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 26 Mar 2014 03:59:31 +0000 (13:59 +1000)
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>
drivers/gpu/drm/nouveau/nouveau_hwmon.c

index 4aff04fa483c5e82acf1c66b1e63833bc23391cf..5e4ab58f4f6b3d7f5f065dd15f1e553bcdd022d9 100644 (file)
@@ -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 */