From: Dan Carpenter <dan.carpenter@oracle.com>
To: Dave Airlie <airlied@redhat.com>,
Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Cc: kernel-janitors@vger.kernel.org,
Gerd Hoffmann <kraxel@redhat.com>,
dri-devel@lists.freedesktop.org,
virtualization@lists.linux-foundation.org
Subject: [PATCH] drm: qxl: add missing return check
Date: Tue, 14 Mar 2017 07:54:10 +0000 [thread overview]
Message-ID: <20170314075410.GB5984@mwanda> (raw)
My static checker complains that "release" is uninitialized if
qxl_alloc_release_reserved() fails, so let's add a check for that.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 9548bb58d3bc..058340a002c2 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -572,6 +572,8 @@ static void qxl_cursor_atomic_update(struct drm_plane *plane,
ret = qxl_alloc_release_reserved(qdev, sizeof(*cmd),
QXL_RELEASE_CURSOR_CMD,
&release, NULL);
+ if (ret)
+ return;
cmd = (struct qxl_cursor_cmd *) qxl_release_map(qdev, release);
next reply other threads:[~2017-03-14 7:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-14 7:54 Dan Carpenter [this message]
2017-03-14 11:02 ` [PATCH] drm: qxl: add missing return check 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=20170314075410.GB5984@mwanda \
--to=dan.carpenter@oracle.com \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kraxel@redhat.com \
--cc=krisman@collabora.co.uk \
--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