From: jgq516@gmail.com
To: dledford@redhat.com, jgg@ziepe.ca
Cc: linux-rdma@vger.kernel.org,
Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
Subject: [PATCH] RDMA/core: remove err in iw_query_port
Date: Thu, 9 Jan 2020 14:40:43 +0100 [thread overview]
Message-ID: <20200109134043.15568-1-guoqing.jiang@cloud.ionos.com> (raw)
From: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
Since we can return device->ops.query_port directly, so no need
to keep those lines.
Signed-off-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
---
drivers/infiniband/core/device.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 2dd2cfe9b561..51ab6d31fbf4 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -1979,7 +1979,6 @@ static int iw_query_port(struct ib_device *device,
{
struct in_device *inetdev;
struct net_device *netdev;
- int err;
memset(port_attr, 0, sizeof(*port_attr));
@@ -2010,11 +2009,7 @@ static int iw_query_port(struct ib_device *device,
}
dev_put(netdev);
- err = device->ops.query_port(device, port_num, port_attr);
- if (err)
- return err;
-
- return 0;
+ return device->ops.query_port(device, port_num, port_attr);
}
static int __ib_query_port(struct ib_device *device,
--
2.17.1
next reply other threads:[~2020-01-09 13:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-09 13:40 jgq516 [this message]
2020-01-10 15:23 ` [PATCH] RDMA/core: remove err in iw_query_port 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=20200109134043.15568-1-guoqing.jiang@cloud.ionos.com \
--to=jgq516@gmail.com \
--cc=dledford@redhat.com \
--cc=guoqing.jiang@cloud.ionos.com \
--cc=jgg@ziepe.ca \
--cc=linux-rdma@vger.kernel.org \
/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).