diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2020-03-23 17:49:06 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2020-03-26 16:50:05 +0300 |
commit | 873863b6214a034e8d4e4bfc8232f65bf9a292fe (patch) | |
tree | 59ed537b927d336d1d9280f307d6654376cceb0f /drivers/gpu/drm/qxl/qxl_kms.c | |
parent | d0c116adc656e88a36ddc71ff6c9da5e75fc6b44 (diff) | |
download | linux-873863b6214a034e8d4e4bfc8232f65bf9a292fe.tar.xz |
drm/qxl: Use drmm_add_final_kfree
With this we can drop the final kfree from the release function.
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
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
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_kms.c')
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_kms.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 <linux/pci.h> #include <drm/drm_drv.h> +#include <drm/drm_managed.h> #include <drm/drm_probe_helper.h> #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); |