[patch] drm/nouveau/hwmon: remove some redundant checks (original) (raw)
Ben Skeggs bskeggs at redhat.com
Thu Feb 6 21:37:05 PST 2014
- Previous message: [patch] drm/nouveau/hwmon: remove some redundant checks
- Next message: [Bug 73530] Asus U38N: Black screen with Radeon driver in Linux 3.10, 3.11, 3.12, 3.13
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
----- Original Message -----
From: "Dan Carpenter" <dan.carpenter at oracle.com> To: "David Airlie" <airlied at linux.ie> Cc: "Ben Skeggs" <bskeggs at redhat.com>, "Martin Peres" <martin.peres at labri.fr>, "Ilia Mirkin" <imirkin at alum.mit.edu>, "Dave Airlie" <airlied at redhat.com>, dri-devel at lists.freedesktop.org, kernel-janitors at vger.kernel.org Sent: Thursday, 6 February, 2014 7:29:43 PM Subject: [patch] drm/nouveau/hwmon: remove some redundant checks
No need to check "ret" twice in a row. Got it. Thank you!
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
diff --git a/drivers/gpu/drm/nouveau/nouveauhwmon.c b/drivers/gpu/drm/nouveau/nouveauhwmon.c index 4aff04fa483c..5e4ab58f4f6b 100644 --- a/drivers/gpu/drm/nouveau/nouveauhwmon.c +++ b/drivers/gpu/drm/nouveau/nouveauhwmon.c @@ -587,18 +587,14 @@ nouveauhwmoninit(struct drmdevice *dev) /* set the default attributes */ ret = sysfscreategroup(&hwmondev->kobj, &hwmondefaultattrgroup); - if (ret) { - if (ret) - goto error; - } + if (ret) + goto error; /* if the card has a working thermal sensor */ if (therm->tempget(therm) >= 0) { ret = sysfscreategroup(&hwmondev->kobj, &hwmontempattrgroup); - if (ret) { - if (ret) - goto error; - } + if (ret) + goto error; } /* if the card has a pwm fan */
- Previous message: [patch] drm/nouveau/hwmon: remove some redundant checks
- Next message: [Bug 73530] Asus U38N: Black screen with Radeon driver in Linux 3.10, 3.11, 3.12, 3.13
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]