smb: client: Fix a NULL vs IS_ERR() check in wsl_set_xattrs()
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 31 Jan 2024 07:10:18 +0000 (10:10 +0300)
committerSteve French <stfrench@microsoft.com>
Mon, 11 Mar 2024 00:33:58 +0000 (19:33 -0500)
This was intended to be an IS_ERR() check.  The ea_create_context()
function doesn't return NULL.

Fixes: 1eab17fe485c ("smb: client: add support for WSL reparse points")
Reviewed-by: Paulo Alcantara <pc@manguebit.com>
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/reparse.c

index b240ccc9c887ca1495a0ae40d1de0830d2089864..24feeaa32280ebb892fae82a8b8da22303aff82a 100644 (file)
@@ -230,7 +230,7 @@ static int wsl_set_xattrs(struct inode *inode, umode_t _mode,
        }
 
        cc = ea_create_context(dlen, &cc_len);
-       if (!cc)
+       if (IS_ERR(cc))
                return PTR_ERR(cc);
 
        ea = &cc->ea;