RDMA/core: Return void from ib_device_check_mandatory()
authorKamal Heib <kamalheib1@gmail.com>
Tue, 21 May 2019 07:05:07 +0000 (10:05 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 21 May 2019 18:30:46 +0000 (15:30 -0300)
The return value from ib_device_check_mandatory() is always 0 - change it
to be void.

Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/device.c

index 78dc07c..afb3f59 100644 (file)
@@ -270,7 +270,7 @@ struct ib_port_data_rcu {
        struct ib_port_data pdata[];
 };
 
-static int ib_device_check_mandatory(struct ib_device *device)
+static void ib_device_check_mandatory(struct ib_device *device)
 {
 #define IB_MANDATORY_FUNC(x) { offsetof(struct ib_device_ops, x), #x }
        static const struct {
@@ -305,8 +305,6 @@ static int ib_device_check_mandatory(struct ib_device *device)
                        break;
                }
        }
-
-       return 0;
 }
 
 /*
@@ -1175,10 +1173,7 @@ static int setup_device(struct ib_device *device)
        int ret;
 
        setup_dma_device(device);
-
-       ret = ib_device_check_mandatory(device);
-       if (ret)
-               return ret;
+       ib_device_check_mandatory(device);
 
        ret = setup_port_data(device);
        if (ret) {