drm/vram: Unconditonally set BO call-back functions
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 11 Sep 2019 11:09:10 +0000 (13:09 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Thu, 12 Sep 2019 17:54:42 +0000 (19:54 +0200)
The statement's condition is always true.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190911110910.30698-5-tzimmermann@suse.de
drivers/gpu/drm/drm_gem_vram_helper.c

index 31b037b..7bee80c 100644 (file)
@@ -93,8 +93,7 @@ static int drm_gem_vram_init(struct drm_device *dev,
        int ret;
        size_t acc_size;
 
-       if (!gbo->bo.base.funcs)
-               gbo->bo.base.funcs = &drm_gem_vram_object_funcs;
+       gbo->bo.base.funcs = &drm_gem_vram_object_funcs;
 
        ret = drm_gem_object_init(dev, &gbo->bo.base, size);
        if (ret)