Skip to contentSkip to conversation

gpu: host1x: drm: Cocci spatch "ptr_ret.spatch"

PATCH New Thomas Meyer 1 participant 1 message Jun 1, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpu: host1x: drm: Cocci spatch "ptr_ret.spatch"

---

drivers/gpu/host1x/drm/drm.c +1 -4
diff -u -p 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,
drivers/gpu/host1x/drm/gem.c +1 -4
diff -u -p 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,