From 873863b6214a034e8d4e4bfc8232f65bf9a292fe Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Mon, 23 Mar 2020 15:49:06 +0100 Subject: drm/qxl: Use drmm_add_final_kfree With this we can drop the final kfree from the release function. Acked-by: Gerd Hoffmann Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualization@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20200323144950.3018436-8-daniel.vetter@ffwll.ch --- drivers/gpu/drm/qxl/qxl_kms.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/gpu/drm/qxl/qxl_kms.c') diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c index 70b20ee4741a..09d7b5f6d172 100644 --- a/drivers/gpu/drm/qxl/qxl_kms.c +++ b/drivers/gpu/drm/qxl/qxl_kms.c @@ -27,6 +27,7 @@ #include #include +#include #include #include "qxl_drv.h" @@ -121,6 +122,7 @@ int qxl_device_init(struct qxl_device *qdev, qdev->ddev.pdev = pdev; pci_set_drvdata(pdev, &qdev->ddev); qdev->ddev.dev_private = qdev; + drmm_add_final_kfree(&qdev->ddev, qdev); mutex_init(&qdev->gem.mutex); mutex_init(&qdev->update_area_mutex); -- cgit v1.2.3