'allowed' is equivalent to '!!r' so drop it.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
*/
if (reply_wake && msg->cookie_reply > 0) {
struct kdbus_reply *r;
- bool allowed = false;
/*
* The connection that we are replying to has not
*reply_wake = kdbus_reply_ref(r);
else
kdbus_reply_unref(r);
-
- allowed = true;
}
mutex_unlock(&conn_dst->lock);
- return allowed ? 0 : -EPERM;
+ return r ? 0 : -EPERM;
}
/* ... otherwise, ask the policy DBs for permission */