From: Haggai Eran <[email protected]>

The output size should be the sum of the core access reg output struct plus the
size of the specific register data provided by the caller.

Signed-off-by: Haggai Eran <[email protected]>
Signed-off-by: Eli Cohen <[email protected]>
---
 drivers/net/ethernet/mellanox/mlx5/core/port.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/port.c 
b/drivers/net/ethernet/mellanox/mlx5/core/port.c
index f6afe7b..8c9ac87 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/port.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/port.c
@@ -57,7 +57,7 @@ int mlx5_core_access_reg(struct mlx5_core_dev *dev, void 
*data_in,
        in->arg = cpu_to_be32(arg);
        in->register_id = cpu_to_be16(reg_num);
        err = mlx5_cmd_exec(dev, in, sizeof(*in) + size_in, out,
-                           sizeof(out) + size_out);
+                           sizeof(*out) + size_out);
        if (err)
                goto ex2;
 
-- 
1.8.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to