lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d1d2c154-0097-9630-f9ed-9ee55de03a24@users.sourceforge.net>
Date:	Fri, 22 Jul 2016 17:48:25 +0200
From:	SF Markus Elfring <elfring@...rs.sourceforge.net>
To:	dri-devel@...ts.freedesktop.org,
	Christian Gmeiner <christian.gmeiner@...il.com>,
	David Airlie <airlied@...ux.ie>,
	Lucas Stach <l.stach@...gutronix.de>,
	Russell King <linux+etnaviv@...linux.org.uk>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	kernel-janitors@...r.kernel.org,
	Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 2/4] GPU-DRM-Etnaviv: Delete unnecessary if statement in
 __etnaviv_gem_new()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Fri, 22 Jul 2016 16:45:22 +0200

Move a return statement into a block for successful function execution.
Omit a duplicate check for the local variable "ret" then at the end.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 drivers/gpu/drm/etnaviv/etnaviv_gem.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
index 8eee742..851a8ba 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
@@ -661,13 +661,9 @@ static struct drm_gem_object *__etnaviv_gem_new(struct drm_device *dev,
 		 */
 		mapping = obj->filp->f_mapping;
 		mapping_set_gfp_mask(mapping, GFP_HIGHUSER);
+		return obj;
 	}
 
-	if (ret)
-		goto fail;
-
-	return obj;
-
 fail:
 	drm_gem_object_unreference_unlocked(obj);
 	return ERR_PTR(ret);
-- 
2.9.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ