From patchwork Tue Nov 24 23:11:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 7694491 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 737229F2EC for ; Tue, 24 Nov 2015 23:11:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B2D362082E for ; Tue, 24 Nov 2015 23:11:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 83747207B1 for ; Tue, 24 Nov 2015 23:11:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755435AbbKXXL4 (ORCPT ); Tue, 24 Nov 2015 18:11:56 -0500 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 Received: from 1.general.cking.us.vpn ([10.172.65.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1a1MkR-0002k4-Ee; Tue, 24 Nov 2015 23:11:44 +0000 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> X-Mailer: git-send-email 2.6.2 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; + } } }