drm/shmem: Cleanup drm_gem_shmem_create_with_handle()
authorRob Clark <robdclark@chromium.org>
Mon, 23 Jan 2023 15:48:31 +0000 (07:48 -0800)
committerSteven Price <steven.price@arm.com>
Mon, 30 Jan 2023 14:35:01 +0000 (14:35 +0000)
commitd023d6f741c85bb00d2ca43d338327fbc150c113
tree3c2c98118b9e7f12c2944a0df382f14cf21b268d
parent17ab1ea679be48d905559d968a7622f5f212de6e
drm/shmem: Cleanup drm_gem_shmem_create_with_handle()

Once we create the handle, the handle owns the reference.  Currently
nothing was doing anything with the shmem ptr after the handle was
created, but let's change drm_gem_shmem_create_with_handle() to not
return the pointer, so-as to not encourage problematic use of this
function in the future.  As a bonus, it makes the code a bit cleaner.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230123154831.3191821-1-robdclark@gmail.com
drivers/gpu/drm/drm_gem_shmem_helper.c