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: Dan Carpenter <dan.carpenter@oracle.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170314075410.GB5984@mwanda
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Dan Carpenter 2017-03-14 10:54:10 +03:00 committed by Gerd Hoffmann
parent 43c2794022
commit ee5cb7c465
1 changed files with 2 additions and 0 deletions

View File

@ -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);