From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Date: Tue, 25 Nov 2014 10:21:30 +0000 Subject: [patch] amdkfd: fix some error handling in ioctl Message-Id: <20141125102129.GB23215@mwanda> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Oded Gabbay , Andrew Lewycky Cc: David Airlie , dri-devel@lists.freedesktop.org, kernel-janitors@vger.kernel.org There is a typo here so the errors from kfd_bind_process_to_device() are not detected. Signed-off-by: Dan Carpenter 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; } From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: [patch] amdkfd: fix some error handling in ioctl Date: Tue, 25 Nov 2014 13:21:30 +0300 Message-ID: <20141125102129.GB23215@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline Sender: kernel-janitors-owner@vger.kernel.org To: Oded Gabbay , Andrew Lewycky Cc: David Airlie , dri-devel@lists.freedesktop.org, kernel-janitors@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org There is a typo here so the errors from kfd_bind_process_to_device() are not detected. Signed-off-by: Dan Carpenter 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; }