Skip to content

Commit

Permalink
drm: Fix the crash issue when user space drm application use drmPrime…
Browse files Browse the repository at this point in the history
…FDToHandle method to import dmabuf from other module

Signed-off-by:andy.hu <andy.hu@starfive.com>
  • Loading branch information
andy.hu authored and sw.multimedia committed Dec 21, 2021
1 parent 3ef6017 commit f08da5f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/gpu/drm/starfive/starfive_drm_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static struct starfive_drm_gem_obj *
starfive_obj = kzalloc(sizeof(*starfive_obj), GFP_KERNEL);
if (!starfive_obj)
return ERR_PTR(-ENOMEM);

starfive_obj->base.funcs = &starfive_gem_object_funcs;
obj = &starfive_obj->base;
drm_gem_object_init(drm, obj, size);

Expand Down Expand Up @@ -167,8 +167,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:
Expand Down

0 comments on commit f08da5f

Please sign in to comment.