mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
qxl: No need for NULL check before calling qxl_bo_unref()
qxl_bo_unref() is already performing a NULL check. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Link: http://patchwork.freedesktop.org/patch/msgid/20181120162004.22807-1-cfergeau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
a071a8ff1f
commit
76a57db4a8
3 changed files with 4 additions and 9 deletions
|
@ -670,9 +670,7 @@ static void qxl_cursor_atomic_update(struct drm_plane *plane,
|
||||||
qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
|
qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
|
||||||
qxl_release_fence_buffer_objects(release);
|
qxl_release_fence_buffer_objects(release);
|
||||||
|
|
||||||
if (old_cursor_bo)
|
qxl_bo_unref(&old_cursor_bo);
|
||||||
qxl_bo_unref(&old_cursor_bo);
|
|
||||||
|
|
||||||
qxl_bo_unref(&cursor_bo);
|
qxl_bo_unref(&cursor_bo);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -247,8 +247,7 @@ void qxl_draw_opaque_fb(const struct qxl_fb_image *qxl_fb_image,
|
||||||
qxl_release_fence_buffer_objects(release);
|
qxl_release_fence_buffer_objects(release);
|
||||||
|
|
||||||
out_free_palette:
|
out_free_palette:
|
||||||
if (palette_bo)
|
qxl_bo_unref(&palette_bo);
|
||||||
qxl_bo_unref(&palette_bo);
|
|
||||||
out_free_image:
|
out_free_image:
|
||||||
qxl_image_free_objects(qdev, dimage);
|
qxl_image_free_objects(qdev, dimage);
|
||||||
out_free_drawable:
|
out_free_drawable:
|
||||||
|
|
|
@ -313,10 +313,8 @@ int qxl_device_init(struct qxl_device *qdev,
|
||||||
|
|
||||||
void qxl_device_fini(struct qxl_device *qdev)
|
void qxl_device_fini(struct qxl_device *qdev)
|
||||||
{
|
{
|
||||||
if (qdev->current_release_bo[0])
|
qxl_bo_unref(&qdev->current_release_bo[0]);
|
||||||
qxl_bo_unref(&qdev->current_release_bo[0]);
|
qxl_bo_unref(&qdev->current_release_bo[1]);
|
||||||
if (qdev->current_release_bo[1])
|
|
||||||
qxl_bo_unref(&qdev->current_release_bo[1]);
|
|
||||||
flush_work(&qdev->gc_work);
|
flush_work(&qdev->gc_work);
|
||||||
qxl_ring_free(qdev->command_ring);
|
qxl_ring_free(qdev->command_ring);
|
||||||
qxl_ring_free(qdev->cursor_ring);
|
qxl_ring_free(qdev->cursor_ring);
|
||||||
|
|
Loading…
Reference in a new issue