From: Qinglang Miao <miaoqinglang@huawei.com>
To: Dave Airlie <airlied@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
"David Airlie" <airlied@linux.ie>,
Daniel Vetter <daniel@ffwll.ch>
Cc: <virtualization@lists.linux-foundation.org>,
<spice-devel@lists.freedesktop.org>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
Qinglang Miao <miaoqinglang@huawei.com>
Subject: [PATCH -next] drm/qxl: simplify the return expression of qxl_plane_prepare_fb()
Date: Mon, 21 Sep 2020 21:10:22 +0800 [thread overview]
Message-ID: <20200921131022.91649-1-miaoqinglang@huawei.com> (raw)
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
next reply other threads:[~2020-09-21 13:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-21 13:10 Qinglang Miao [this message]
2020-09-29 9:32 ` [PATCH -next] drm/qxl: simplify the return expression of qxl_plane_prepare_fb() Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200921131022.91649-1-miaoqinglang@huawei.com \
--to=miaoqinglang@huawei.com \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=spice-devel@lists.freedesktop.org \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).