From: Leon Romanovsky <leonro@xxxxxxxxxxxx> All callers to process_mad() allocate MAD output buffer with kzalloc, so there is no need to clear memory again. Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> --- drivers/infiniband/hw/mlx5/mad.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/mad.c b/drivers/infiniband/hw/mlx5/mad.c index 348c1df69cdc..0a5eb6e1798c 100644 --- a/drivers/infiniband/hw/mlx5/mad.c +++ b/drivers/infiniband/hw/mlx5/mad.c @@ -284,8 +284,6 @@ int mlx5_ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num, *out_mad_size != sizeof(*out_mad))) return IB_MAD_RESULT_FAILURE; - memset(out_mad->data, 0, sizeof(out_mad->data)); - if (MLX5_CAP_GEN(dev->mdev, vport_counters) && in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_PERF_MGMT && in_mad->mad_hdr.method == IB_MGMT_METHOD_GET) { -- 2.20.1