OSDN Git Service

IB/mlx5: Remove unnecessary else statement
authorErez Alfasi <ereza@mellanox.com>
Wed, 2 Oct 2019 12:25:16 +0000 (15:25 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 4 Oct 2019 18:38:16 +0000 (15:38 -0300)
'else' is not generally useful after a break or return. Remove this
unnecessary statement.

Link: https://lore.kernel.org/r/20191002122517.17721-4-leon@kernel.org
Signed-off-by: Erez Alfasi <ereza@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/main.c

index 8315394..b95c2b0 100644 (file)
@@ -844,8 +844,8 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
        resp_len = sizeof(resp.comp_mask) + sizeof(resp.response_length);
        if (uhw->outlen && uhw->outlen < resp_len)
                return -EINVAL;
-       else
-               resp.response_length = resp_len;
+
+       resp.response_length = resp_len;
 
        if (uhw->inlen && !ib_is_udata_cleared(uhw, 0, uhw->inlen))
                return -EINVAL;