All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Oded Gabbay <oded.gabbay@amd.com>,
	Andrew Lewycky <Andrew.Lewycky@amd.com>
Cc: David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org, kernel-janitors@vger.kernel.org
Subject: [patch] amdkfd: fix some error handling in ioctl
Date: Tue, 25 Nov 2014 10:21:30 +0000	[thread overview]
Message-ID: <20141125102129.GB23215@mwanda> (raw)

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;
 	}

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Oded Gabbay <oded.gabbay@amd.com>,
	Andrew Lewycky <Andrew.Lewycky@amd.com>
Cc: David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org, kernel-janitors@vger.kernel.org
Subject: [patch] amdkfd: fix some error handling in ioctl
Date: Tue, 25 Nov 2014 13:21:30 +0300	[thread overview]
Message-ID: <20141125102129.GB23215@mwanda> (raw)

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;
 	}

             reply	other threads:[~2014-11-25 10:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25 10:21 Dan Carpenter [this message]
2014-11-25 10:21 ` [patch] amdkfd: fix some error handling in ioctl Dan Carpenter
2014-11-25 12:27 ` Oded Gabbay
2014-11-25 12:27   ` Oded Gabbay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141125102129.GB23215@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=Andrew.Lewycky@amd.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=oded.gabbay@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.