diff --git a/fs/nfs/client.c b/fs/nfs/client.c index a05f77f9c21e..af838d1ed281 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -399,7 +399,7 @@ struct nfs_client *nfs_get_client(const struct nfs_client_initdata *cl_init) if (cl_init->hostname == NULL) { WARN_ON(1); - return NULL; + return ERR_PTR(-EINVAL); } /* see if the client already exists */