提交 66333cb3 编写于 作者: D Dan Carpenter 提交者: Oded Gabbay

amdkfd: fix some error handling in ioctl

There is a typo here so the errors from kfd_bind_process_to_device()
are not detected.
Reviewed-by: NOded Gabbay <oded.gabbay@amd.com>
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
上级 a49493b5
...@@ -242,7 +242,7 @@ static long kfd_ioctl_create_queue(struct file *filep, struct kfd_process *p, ...@@ -242,7 +242,7 @@ static long kfd_ioctl_create_queue(struct file *filep, struct kfd_process *p,
mutex_lock(&p->mutex); mutex_lock(&p->mutex);
pdd = kfd_bind_process_to_device(dev, p); pdd = kfd_bind_process_to_device(dev, p);
if (IS_ERR(pdd) < 0) { if (IS_ERR(pdd)) {
err = PTR_ERR(pdd); err = PTR_ERR(pdd);
goto err_bind_process; goto err_bind_process;
} }
...@@ -389,7 +389,7 @@ static long kfd_ioctl_set_memory_policy(struct file *filep, ...@@ -389,7 +389,7 @@ static long kfd_ioctl_set_memory_policy(struct file *filep,
mutex_lock(&p->mutex); mutex_lock(&p->mutex);
pdd = kfd_bind_process_to_device(dev, p); pdd = kfd_bind_process_to_device(dev, p);
if (IS_ERR(pdd) < 0) { if (IS_ERR(pdd)) {
err = PTR_ERR(pdd); err = PTR_ERR(pdd);
goto out; goto out;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册