All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RDMA/core: remove err in iw_query_port
@ 2020-01-09 13:40 jgq516
  2020-01-10 15:23 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: jgq516 @ 2020-01-09 13:40 UTC (permalink / raw)
  To: dledford, jgg; +Cc: linux-rdma, Guoqing Jiang

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] RDMA/core: remove err in iw_query_port
  2020-01-09 13:40 [PATCH] RDMA/core: remove err in iw_query_port jgq516
@ 2020-01-10 15:23 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2020-01-10 15:23 UTC (permalink / raw)
  To: jgq516; +Cc: dledford, linux-rdma, Guoqing Jiang

On Thu, Jan 09, 2020 at 02:40:43PM +0100, jgq516@gmail.com wrote:
> 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(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-10 15:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09 13:40 [PATCH] RDMA/core: remove err in iw_query_port jgq516
2020-01-10 15:23 ` Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.