lkml.org 
[lkml]   [2015]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] kdbus: checking for IS_ERR() instead of NULL
"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;

\
 
 \ /
  Last update: 2015-04-22 16:01    [W:0.046 / U:2.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site