* [patch] amdkfd: fix some error handling in ioctl
@ 2014-11-25 10:21 Dan Carpenter
2014-11-25 12:27 ` Oded Gabbay
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-11-25 10:21 UTC (permalink / raw)
To: Oded Gabbay, Andrew Lewycky; +Cc: David Airlie, dri-devel, kernel-janitors
There is a typo here so the errors from kfd_bind_process_to_device()
are not detected.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
index 64c73ba..c5dd0ae 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
@@ -236,7 +236,7 @@ static long kfd_ioctl_create_queue(struct file *filep, struct kfd_process *p,
mutex_lock(&p->mutex);
pdd = kfd_bind_process_to_device(dev, p);
- if (IS_ERR(pdd) < 0) {
+ if (IS_ERR(pdd)) {
err = PTR_ERR(pdd);
goto err_bind_process;
}
@@ -381,7 +381,7 @@ static long kfd_ioctl_set_memory_policy(struct file *filep,
mutex_lock(&p->mutex);
pdd = kfd_bind_process_to_device(dev, p);
- if (IS_ERR(pdd) < 0) {
+ if (IS_ERR(pdd)) {
err = PTR_ERR(pdd);
goto out;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] amdkfd: fix some error handling in ioctl
2014-11-25 10:21 [patch] amdkfd: fix some error handling in ioctl Dan Carpenter
@ 2014-11-25 12:27 ` Oded Gabbay
0 siblings, 0 replies; 2+ messages in thread
From: Oded Gabbay @ 2014-11-25 12:27 UTC (permalink / raw)
To: Dan Carpenter, Andrew Lewycky; +Cc: kernel-janitors, dri-devel
On 11/25/2014 12:21 PM, Dan Carpenter wrote:
> There is a typo here so the errors from kfd_bind_process_to_device()
> are not detected.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
Patch is:
Reviewed-by: Oded Gabbay <oded.gabbay@amd.com>
And applied to my 3.19-next-wip tree
Oded
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> index 64c73ba..c5dd0ae 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> @@ -236,7 +236,7 @@ static long kfd_ioctl_create_queue(struct file *filep, struct kfd_process *p,
> mutex_lock(&p->mutex);
>
> pdd = kfd_bind_process_to_device(dev, p);
> - if (IS_ERR(pdd) < 0) {
> + if (IS_ERR(pdd)) {
> err = PTR_ERR(pdd);
> goto err_bind_process;
> }
> @@ -381,7 +381,7 @@ static long kfd_ioctl_set_memory_policy(struct file *filep,
> mutex_lock(&p->mutex);
>
> pdd = kfd_bind_process_to_device(dev, p);
> - if (IS_ERR(pdd) < 0) {
> + if (IS_ERR(pdd)) {
> err = PTR_ERR(pdd);
> goto out;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-25 12:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-25 10:21 [patch] amdkfd: fix some error handling in ioctl Dan Carpenter
2014-11-25 12:27 ` Oded Gabbay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).