aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/qxl/qxl_kms.c
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2018-11-20 17:20:02 +0100
committerGerd Hoffmann <kraxel@redhat.com>2018-11-21 09:12:45 +0100
commit76a57db4a867ade779fbe292112cb6d7f0762e4e (patch)
tree8ad5dc59c7b7f73843440d722f5c5aab31cc1fd7 /drivers/gpu/drm/qxl/qxl_kms.c
parentdrm/cirrus: Remove set but not used variable 'bo' (diff)
downloadlinux-dev-76a57db4a867ade779fbe292112cb6d7f0762e4e.tar.xz
linux-dev-76a57db4a867ade779fbe292112cb6d7f0762e4e.zip
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>
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_kms.c')
-rw-r--r--drivers/gpu/drm/qxl/qxl_kms.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c
index f6975d7c7d10..15238a413f9d 100644
--- a/drivers/gpu/drm/qxl/qxl_kms.c
+++ b/drivers/gpu/drm/qxl/qxl_kms.c
@@ -313,10 +313,8 @@ error:
void qxl_device_fini(struct qxl_device *qdev)
{
- if (qdev->current_release_bo[0])
- qxl_bo_unref(&qdev->current_release_bo[0]);
- if (qdev->current_release_bo[1])
- qxl_bo_unref(&qdev->current_release_bo[1]);
+ qxl_bo_unref(&qdev->current_release_bo[0]);
+ qxl_bo_unref(&qdev->current_release_bo[1]);
flush_work(&qdev->gc_work);
qxl_ring_free(qdev->command_ring);
qxl_ring_free(qdev->cursor_ring);