Using devres groups in vgem is unnecessary, as the corresponding cleanup happens automatically when the device is unbound through faux_device_destroy().
Signed-off-by: Danilo Krummrich <[email protected]> --- drivers/gpu/drm/vgem/vgem_drv.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c index 260c64733972..d75f2ee56cf6 100644 --- a/drivers/gpu/drm/vgem/vgem_drv.c +++ b/drivers/gpu/drm/vgem/vgem_drv.c @@ -133,11 +133,6 @@ static int __init vgem_init(void) if (!fdev) return -ENODEV; - if (!devres_open_group(&fdev->dev, NULL, GFP_KERNEL)) { - ret = -ENOMEM; - goto out_unregister; - } - dma_coerce_mask_and_coherent(&fdev->dev, DMA_BIT_MASK(64)); @@ -145,20 +140,18 @@ static int __init vgem_init(void) struct vgem_device, drm); if (IS_ERR(vgem_device)) { ret = PTR_ERR(vgem_device); - goto out_devres; + goto out; } vgem_device->faux_dev = fdev; /* Final step: expose the device/driver to userspace */ ret = drm_dev_register(&vgem_device->drm, 0); if (ret) - goto out_devres; + goto out; return 0; -out_devres: - devres_release_group(&fdev->dev, NULL); -out_unregister: +out: faux_device_destroy(fdev); return ret; } @@ -168,7 +161,6 @@ static void __exit vgem_exit(void) struct faux_device *fdev = vgem_device->faux_dev; drm_dev_unregister(&vgem_device->drm); - devres_release_group(&fdev->dev, NULL); faux_device_destroy(fdev); } base-commit: a50007089e078a1b7a826559a02277b1601ee189 -- 2.52.0
