Return-Path: Received: from youngberry.canonical.com ([91.189.89.112]:35455 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754143AbbKXXLz (ORCPT ); Tue, 24 Nov 2015 18:11:55 -0500 From: Colin King To: Trond Myklebust , Anna Schumaker , "J . Bruce Fields" , Jeff Layton , "David S . Miller" , Chuck Lever , Sagi Grimberg , Steve Wise , Doug Ledford , linux-nfs@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] xprtrdma: add missing curly braces, set rc to zero on non-zero Date: Tue, 24 Nov 2015 23:11:41 +0000 Message-Id: <1448406701-12474-1-git-send-email-colin.king@canonical.com> Sender: linux-nfs-owner@vger.kernel.org List-ID: From: Colin Ian King Add the missing curly braces so that rc is only set to zero when it is non-zero. Without this minor fix, rc is set to zero even when it is zero, which is slightly redundant. Detected with smatch static analysis. Signed-off-by: Colin Ian King --- net/sunrpc/xprtrdma/verbs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index eadd1655..2cc1014 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -852,10 +852,11 @@ retry: if (extras) { rc = rpcrdma_ep_post_extra_recv(r_xprt, extras); - if (rc) + if (rc) { pr_warn("%s: rpcrdma_ep_post_extra_recv: %i\n", __func__, rc); rc = 0; + } } } -- 2.6.2