summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/starfive/starfive_drm_gem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/starfive/starfive_drm_gem.c b/drivers/gpu/drm/starfive/starfive_drm_gem.c
index c2a2966b4936..12fecc57b4e1 100644
--- a/drivers/gpu/drm/starfive/starfive_drm_gem.c
+++ b/drivers/gpu/drm/starfive/starfive_drm_gem.c
@@ -106,6 +106,7 @@ starfive_drm_gem_alloc_object(struct drm_device *drm, unsigned int size)
if (!starfive_obj)
return ERR_PTR(-ENOMEM);
+ starfive_obj->base.funcs = &starfive_gem_object_funcs;
obj = &starfive_obj->base;
ret = drm_gem_object_init(drm, obj, round_up(size, PAGE_SIZE));
if (ret)
@@ -165,8 +166,6 @@ starfive_drm_gem_create_object(struct drm_device *drm, unsigned int size,
if (ret)
goto err_free_obj;
- starfive_obj->base.funcs = &starfive_gem_object_funcs;
-
return starfive_obj;
err_free_obj: