Commit 1e123d96 authored by Guoqing Jiang's avatar Guoqing Jiang Committed by Jason Gunthorpe

RDMA/core: Remove err in iw_query_port

Since we can return device->ops.query_port directly, so no need to keep
those lines.

Link: https://lore.kernel.org/r/20200109134043.15568-1-guoqing.jiang@cloud.ionos.comSigned-off-by: default avatarGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 626903e9
......@@ -1977,7 +1977,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));
......@@ -2008,11 +2007,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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment