From: Markus Elfring <[email protected]>
Date: Sun, 28 Dec 2014 09:05:25 +0100

The p9_client_clunk() function was called in one case by the
v9fs_fid_xattr_get() function during error handling even if the passed
variable "attr_fid" contained a null pointer.

Let us delete an unnecessary variable assignment there and return from
this implementation directly after a failure detection for
a p9_client_xattrwalk() call.

Signed-off-by: Markus Elfring <[email protected]>
---
 fs/9p/xattr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c
index 8e72269..05ef790 100644
--- a/fs/9p/xattr.c
+++ b/fs/9p/xattr.c
@@ -34,8 +34,7 @@ ssize_t v9fs_fid_xattr_get(struct p9_fid *fid, const char 
*name,
                retval = PTR_ERR(attr_fid);
                p9_debug(P9_DEBUG_VFS, "p9_client_attrwalk failed %zd\n",
                         retval);
-               attr_fid = NULL;
-               goto error;
+               return retval;
        }
        if (!buffer_size) {
                /* request to get the attr_size */
-- 
2.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to