linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drm/qxl: simplify the return expression of qxl_plane_prepare_fb()
@ 2020-09-21 13:10 Qinglang Miao
  2020-09-29  9:32 ` Gerd Hoffmann
  0 siblings, 1 reply; 2+ messages in thread
From: Qinglang Miao @ 2020-09-21 13:10 UTC (permalink / raw)
  To: Dave Airlie, Gerd Hoffmann, David Airlie, Daniel Vetter
  Cc: virtualization, spice-devel, dri-devel, linux-kernel, Qinglang Miao

Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
 drivers/gpu/drm/qxl/qxl_display.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 6063f3a15..65de1f69a 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -768,7 +768,6 @@ static int qxl_plane_prepare_fb(struct drm_plane *plane,
 	struct drm_gem_object *obj;
 	struct qxl_bo *user_bo;
 	struct qxl_surface surf;
-	int ret;
 
 	if (!new_state->fb)
 		return 0;
@@ -804,11 +803,7 @@ static int qxl_plane_prepare_fb(struct drm_plane *plane,
 		}
 	}
 
-	ret = qxl_bo_pin(user_bo);
-	if (ret)
-		return ret;
-
-	return 0;
+	return qxl_bo_pin(user_bo);
 }
 
 static void qxl_plane_cleanup_fb(struct drm_plane *plane,
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] drm/qxl: simplify the return expression of qxl_plane_prepare_fb()
  2020-09-21 13:10 [PATCH -next] drm/qxl: simplify the return expression of qxl_plane_prepare_fb() Qinglang Miao
@ 2020-09-29  9:32 ` Gerd Hoffmann
  0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2020-09-29  9:32 UTC (permalink / raw)
  To: Qinglang Miao
  Cc: Dave Airlie, David Airlie, Daniel Vetter, virtualization,
	spice-devel, dri-devel, linux-kernel

On Mon, Sep 21, 2020 at 09:10:22PM +0800, Qinglang Miao wrote:
> Simplify the return expression.

Pushed to drm-misc-next.

thanks,
  Gerd


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-29  9:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 13:10 [PATCH -next] drm/qxl: simplify the return expression of qxl_plane_prepare_fb() Qinglang Miao
2020-09-29  9:32 ` Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).