Skip to contentSkip to conversation

xprtrdma: Delete an error message for a failed memory allocation in xprt_rdma_bc_setup()

PATCH In review SF Markus Elfring 2 participants 2 messages May 22, 2017

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xprtrdma: Delete an error message for a failed memory allocation in xprt_rdma_bc_setup()

From: Markus Elfring <[email protected]>
Date: Mon, 22 May 2017 22:18:28 +0200

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

---
 net/sunrpc/xprtrdma/backchannel.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
net/sunrpc/xprtrdma/backchannel.c +2 -4
index 24fedd4b117e..03f6b5840764 100644
@@ -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;
Signature · 1 line
2.13.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · SF Markus Elfring

From: Markus Elfring <[email protected]>
Date: Mon, 22 May 2017 22:18:28 +0200

Quoted 6 lines

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Quoted 24 lines

---
net/sunrpc/xprtrdma/backchannel.c | 6 ++----

1 file changed, 2 insertions(+), 4 deletions(-)
net/sunrpc/xprtrdma/backchannel.c +2 -4
index 24fedd4b117e..03f6b5840764 100644
@@ -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;
Signature · 1 line
2.13.0

--
Chuck Lever