Skip to contentSkip to conversation

drm/vc4: simplify the return expression of vc4_grab_bin_bo()

PATCH Applied [email protected] 2 participants 2 messages Apr 29, 2022

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

PATCH 1/1 drm/vc4: simplify the return expression of vc4_grab_bin_bo()

From: Minghao Chi <[email protected]>

Simplify the return expression.

---
 drivers/gpu/drm/vc4/vc4_bo.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/gpu/drm/vc4/vc4_bo.c +1 -7
index e451cc5bcfac..49c0f2ac868b 100644
@@ -738,19 +738,13 @@ static const struct drm_gem_object_funcs vc4_gem_object_funcs = {
 
 static int vc4_grab_bin_bo(struct vc4_dev *vc4, struct vc4_file *vc4file)
 {
-	int ret;
-
 	if (!vc4->v3d)
 		return -ENODEV;
 
 	if (vc4file->bin_bo_used)
 		return 0;
 
-	ret = vc4_v3d_bin_bo_get(vc4, &vc4file->bin_bo_used);
-	if (ret)
-		return ret;
-
-	return 0;
+	return vc4_v3d_bin_bo_get(vc4, &vc4file->bin_bo_used);
 }
 
 int vc4_create_bo_ioctl(struct drm_device *dev, void *data,
Signature · 1 line
2.25.1
#1 lore raw

Re: (subset) [PATCH] drm/vc4: simplify the return expression of vc4_grab_bin_bo()

Quoted 5 lines · On Fri, 29 Apr 2022 09:02:08 +0000, [email protected] wrote:

From: Minghao Chi <[email protected]>

Simplify the return expression.

Applied to drm/drm-misc (drm-misc-next).

Thanks!
Maxime