diff options
author | Guoqing Jiang <guoqing.jiang@cloud.ionos.com> | 2020-01-09 14:40:43 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-01-10 11:19:04 -0400 |
commit | 1e123d96b85fd41278efc994f8096e1df86fd427 (patch) | |
tree | 582ab767af52f86d763ff1dbdedf9e6c597ebdae | |
parent | 626903e9355bdf8d401fc0ac7e7407862c642710 (diff) | |
download | linux-1e123d96b85fd41278efc994f8096e1df86fd427.tar.bz2 |
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.com
Signed-off-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
-rw-r--r-- | drivers/infiniband/core/device.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c index e4c3ea727eac..f6c255202d7f 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c @@ -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, |