linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Doug Ledford <dledford@redhat.com>, Jason Gunthorpe <jgg@mellanox.com>
Cc: Leon Romanovsky <leonro@mellanox.com>,
	RDMA mailing list <linux-rdma@vger.kernel.org>,
	Erez Alfasi <ereza@mellanox.com>,
	Parav Pandit <parav@mellanox.com>
Subject: [PATCH rdma-next 3/4] IB/mlx5: Remove unnecessary else statement
Date: Wed,  2 Oct 2019 15:25:16 +0300	[thread overview]
Message-ID: <20191002122517.17721-4-leon@kernel.org> (raw)
In-Reply-To: <20191002122517.17721-1-leon@kernel.org>

From: Erez Alfasi <ereza@mellanox.com>

'else' is not generally useful after a break or
return. Remove this unnecessary statement.

Signed-off-by: Erez Alfasi <ereza@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 drivers/infiniband/hw/mlx5/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 831539419c30..b95c2b05f682 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -844,8 +844,8 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
 	resp_len = sizeof(resp.comp_mask) + sizeof(resp.response_length);
 	if (uhw->outlen && uhw->outlen < resp_len)
 		return -EINVAL;
-	else
-		resp.response_length = resp_len;
+
+	resp.response_length = resp_len;
 
 	if (uhw->inlen && !ib_is_udata_cleared(uhw, 0, uhw->inlen))
 		return -EINVAL;
-- 
2.20.1


  parent reply	other threads:[~2019-10-02 12:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 12:25 [PATCH rdma-next 0/4] Unrelated code cleanups Leon Romanovsky
2019-10-02 12:25 ` [PATCH rdma-next 1/4] RDMA/mlx5: Group boolean parameters to take less space Leon Romanovsky
2019-10-02 12:25 ` [PATCH rdma-next 2/4] IB/mlx5: Remove unnecessary return statement Leon Romanovsky
2019-10-02 12:25 ` Leon Romanovsky [this message]
2019-10-02 12:25 ` [PATCH rdma-next 4/4] IB/cm: Use container_of() instead of typecast Leon Romanovsky
2019-10-04 18:49 ` [PATCH rdma-next 0/4] Unrelated code cleanups Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191002122517.17721-4-leon@kernel.org \
    --to=leon@kernel.org \
    --cc=dledford@redhat.com \
    --cc=ereza@mellanox.com \
    --cc=jgg@mellanox.com \
    --cc=leonro@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=parav@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).