diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2020-03-23 15:49:22 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2020-03-26 15:38:09 +0100 |
commit | 641b9103d8383f52025bd2e1d3aaed2356efc913 (patch) | |
tree | 8868c2c2e2e9f152de3bdffa9ee5eb6dbdea78d8 /drivers/gpu/drm/drm_drv.c | |
parent | drm: manage drm_minor cleanup with drmm_ (diff) | |
download | linux-641b9103d8383f52025bd2e1d3aaed2356efc913.tar.xz linux-641b9103d8383f52025bd2e1d3aaed2356efc913.zip |
drm: Manage drm_gem_init with drmm_
We might want to look into pushing this down into drm_mm_init, but
that would mean rolling out return codes to a pile of functions
unfortunately. So let's leave that for now.
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200323144950.3018436-24-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/gpu/drm/drm_drv.c')
-rw-r--r-- | drivers/gpu/drm/drm_drv.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 60a17de75ad0..c6123849b721 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -687,13 +687,10 @@ int drm_dev_init(struct drm_device *dev, ret = drm_dev_set_unique(dev, dev_name(parent)); if (ret) - goto err_setunique; + goto err; return 0; -err_setunique: - if (drm_core_check_feature(dev, DRIVER_GEM)) - drm_gem_destroy(dev); err: drm_managed_release(dev); @@ -755,9 +752,6 @@ EXPORT_SYMBOL(devm_drm_dev_init); void drm_dev_fini(struct drm_device *dev) { drm_vblank_cleanup(dev); - - if (drm_core_check_feature(dev, DRIVER_GEM)) - drm_gem_destroy(dev); } EXPORT_SYMBOL(drm_dev_fini); |