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;
}
next reply other threads:[~2014-11-25 10:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 10:21 Dan Carpenter [this message]
2014-11-25 12:27 ` [patch] amdkfd: fix some error handling in ioctl 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 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).