]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
RDMA/core: Remove err in iw_query_port
authorGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
Thu, 9 Jan 2020 13:40:43 +0000 (14:40 +0100)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 10 Jan 2020 15:19:04 +0000 (11:19 -0400)
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>
drivers/infiniband/core/device.c

index e4c3ea727eac6df6f7b24a8af75d0ff5cdf73819..f6c255202d7fd42a3b020a50633b0d304d8db407 100644 (file)
@@ -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,