From: Dan Carpenter <dan.carpenter@oracle.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Daniel Mack <daniel@zonque.org>,
David Herrmann <dh.herrmann@googlemail.com>,
Djalal Harouni <tixxdz@opendz.org>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] kdbus: checking for IS_ERR() instead of NULL
Date: Wed, 22 Apr 2015 16:39:00 +0300 [thread overview]
Message-ID: <20150422133900.GB29383@mwanda> (raw)
"e->user" is never assigned an ERR_PTR(). It can be set to NULL so I
assume that is what is intended here.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/ipc/kdbus/queue.c b/ipc/kdbus/queue.c
index a449464..21fce62 100644
--- a/ipc/kdbus/queue.c
+++ b/ipc/kdbus/queue.c
@@ -637,7 +637,7 @@ int kdbus_queue_entry_move(struct kdbus_queue_entry *e,
lockdep_assert_held(&src->lock);
lockdep_assert_held(&dst->lock);
- if (WARN_ON(IS_ERR(e->user)) || WARN_ON(list_empty(&e->entry)))
+ if (WARN_ON(!e->user) || WARN_ON(list_empty(&e->entry)))
return -EINVAL;
if (src == dst)
return 0;
next reply other threads:[~2015-04-22 13:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-22 13:39 Dan Carpenter [this message]
2015-04-22 17:35 ` [patch] kdbus: checking for IS_ERR() instead of NULL David Herrmann
2015-04-22 18:44 ` Dan Carpenter
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=20150422133900.GB29383@mwanda \
--to=dan.carpenter@oracle.com \
--cc=daniel@zonque.org \
--cc=dh.herrmann@googlemail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tixxdz@opendz.org \
/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