NFS4: avoid underflow when converting error to pointer.
[deliverable/linux.git] / fs / nfs / nfs4namespace.c
index 017b4b01a69c7a747b4afab8c7591b5f2ac59a20..4fdeb1b7042eb94378f7448275d4ee4ef4ec13bc 100644 (file)
@@ -198,14 +198,14 @@ struct rpc_clnt *nfs4_create_sec_client(struct rpc_clnt *clnt, struct inode *ino
 
        flavor = nfs4_negotiate_security(inode, name);
        if ((int)flavor < 0)
-               return ERR_PTR(flavor);
+               return ERR_PTR((int)flavor);
 
        clone = rpc_clone_client(clnt);
        if (IS_ERR(clone))
                return clone;
 
        auth = rpcauth_create(flavor, clone);
-       if (!auth) {
+       if (IS_ERR(auth)) {
                rpc_shutdown_client(clone);
                clone = ERR_PTR(-EIO);
        }
This page took 0.023581 seconds and 5 git commands to generate.