Skip to content

Commit c570799

Browse files
Dan Carpenterbbrezillon
authored andcommitted
drm/panthor: unlock on error in panthor_ioctl_bo_create()
Call drm_dev_exit() before returning -EINVAL. Fixes: cd2c9c3 ("drm/panthor: Add flag to map GEM object Write-Back Cacheable") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Link: https://patch.msgid.link/aUOxxvXXtHHfFCcg@stanley.mountain Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
1 parent fec2c3c commit c570799

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/gpu/drm/panthor/panthor_drv.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -923,8 +923,10 @@ static int panthor_ioctl_bo_create(struct drm_device *ddev, void *data,
923923
}
924924

925925
if ((args->flags & DRM_PANTHOR_BO_NO_MMAP) &&
926-
(args->flags & DRM_PANTHOR_BO_WB_MMAP))
927-
return -EINVAL;
926+
(args->flags & DRM_PANTHOR_BO_WB_MMAP)) {
927+
ret = -EINVAL;
928+
goto out_dev_exit;
929+
}
928930

929931
if (args->exclusive_vm_id) {
930932
vm = panthor_vm_pool_get_vm(pfile->vms, args->exclusive_vm_id);

0 commit comments

Comments
 (0)