drm/amdkfd: Fix handling of return code of dma_buf_get
Subsystems (3)
PATCH 1/1 drm/amdkfd: Fix handling of return code of dma_buf_get
On errors, dma_buf_get returns a negative error code, rather than NULL.
--- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +2 -2
@@ -1629,8 +1629,8 @@ static int kfd_ioctl_import_dmabuf(struct file *filep,return -EINVAL ; dmabuf =dma_buf_get (args->dmabuf_fd); -if (!dmabuf) -return -EINVAL ; +if (IS_ERR (dmabuf)) +return PTR_ERR (dmabuf);mutex_lock (&p->mutex);
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1544814297-13439-1-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Reviewed-by________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Kuehling, Felix <[email protected]>
Sent: Friday, December 14, 2018 2:05:11 PM
To: [email protected]
Cc: Kuehling, Felix
Subject: [PATCH 1/1] drm/amdkfd: Fix handling of return code of dma_buf_get
On errors, dma_buf_get returns a negative error code, rather than NULL.
--- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +2 -2
@@ -1629,8 +1629,8 @@ static int kfd_ioctl_import_dmabuf(struct file *filep,return -EINVAL ; dmabuf =dma_buf_get (args->dmabuf_fd); -if (!dmabuf) -return -EINVAL ; +if (IS_ERR (dmabuf)) +return PTR_ERR (dmabuf);mutex_lock (&p->mutex);
--
2.7.4
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx