xprtrdma: Delete an error message for a failed memory allocation in xprt_rdma_bc_setup()
authorMarkus Elfring <elfring@users.sourceforge.net>
Mon, 22 May 2017 20:18:28 +0000 (22:18 +0200)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 24 May 2017 11:53:37 +0000 (07:53 -0400)
Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
net/sunrpc/xprtrdma/backchannel.c

index 24fedd4..03f6b58 100644 (file)
@@ -119,11 +119,9 @@ int xprt_rdma_bc_setup(struct rpc_xprt *xprt, unsigned int reqs)
 
        for (i = 0; i < (reqs << 1); i++) {
                rqst = kzalloc(sizeof(*rqst), GFP_KERNEL);
-               if (!rqst) {
-                       pr_err("RPC:       %s: Failed to create bc rpc_rqst\n",
-                              __func__);
+               if (!rqst)
                        goto out_free;
-               }
+
                dprintk("RPC:       %s: new rqst %p\n", __func__, rqst);
 
                rqst->rq_xprt = &r_xprt->rx_xprt;