eCryptfs: Fix redundant error check on ecryptfs_find_daemon_by_euid()
authorTyler Hicks <tyhicks@canonical.com>
Wed, 27 Feb 2013 19:37:48 +0000 (11:37 -0800)
committerTyler Hicks <tyhicks@canonical.com>
Wed, 27 Feb 2013 19:41:18 +0000 (11:41 -0800)
commit1111eae90fb64a9d9ed133e410712f1e34fdce4a
tree6a98de6920ac6eb7e92d076edb3265bfc931be72
parent1101d58669a92ed9c9f4c7281404fb1e067a1e28
eCryptfs: Fix redundant error check on ecryptfs_find_daemon_by_euid()

It is sufficient to check the return code of
ecryptfs_find_daemon_by_euid(). If it returns 0, it always sets the
daemon pointer to point to a valid ecryptfs_daemon.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reported-by: Kees Cook <keescook@chromium.org>
fs/ecryptfs/messaging.c