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>] [day] [month] [year] [list]
Date:	Sat, 01 Jun 2013 12:00:03 +0200
From:	Thomas Meyer <thomas@...3r.de>
To:	linux-kernel@...r.kernel.org
Subject: [PATCH] gpu: host1x: drm: Cocci spatch "ptr_ret.spatch"


Signed-off-by: Thomas Meyer <thomas@...3r.de>
---

diff -u -p a/drivers/gpu/host1x/drm/drm.c b/drivers/gpu/host1x/drm/drm.c
--- a/drivers/gpu/host1x/drm/drm.c
+++ b/drivers/gpu/host1x/drm/drm.c
@@ -328,10 +328,7 @@ static int tegra_gem_create(struct drm_d
 
 	bo = tegra_bo_create_with_handle(file, drm, args->size,
 					 &args->handle);
-	if (IS_ERR(bo))
-		return PTR_ERR(bo);
-
-	return 0;
+	return PTR_RET(bo);
 }
 
 static int tegra_gem_mmap(struct drm_device *drm, void *data,
diff -u -p a/drivers/gpu/host1x/drm/gem.c b/drivers/gpu/host1x/drm/gem.c
--- a/drivers/gpu/host1x/drm/gem.c
+++ b/drivers/gpu/host1x/drm/gem.c
@@ -205,10 +205,7 @@ int tegra_bo_dumb_create(struct drm_file
 
 	bo = tegra_bo_create_with_handle(file, drm, args->size,
 					    &args->handle);
-	if (IS_ERR(bo))
-		return PTR_ERR(bo);
-
-	return 0;
+	return PTR_RET(bo);
 }
 
 int tegra_bo_dumb_map_offset(struct drm_file *file, struct drm_device *drm,


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ