提交 ee5cb7c4 编写于 作者: D Dan Carpenter 提交者: Gerd Hoffmann

drm: qxl: add missing return check

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: NDan Carpenter <dan.carpenter@oracle.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170314075410.GB5984@mwandaSigned-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 43c27940
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册