Skip to content

Commit 10bea9c

Browse files
Leon Romanovskyjgunthorpe
authored andcommitted
RDMA/mlx5: Remove redundant allocation warning print
The kmalloc() failure to allocate memory generates enough information and doesn't need to be accompanied by another driver print. Fixes: d69a24e ("IB/mlx5: Move IB event processing onto a workqueue") Signed-off-by: Leon Romanovsky <[email protected]> Reviewed-by: Yuval Shaia <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 15cbc51 commit 10bea9c

File tree

1 file changed

+8
-11
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+8
-11
lines changed

drivers/infiniband/hw/mlx5/main.c

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3345,19 +3345,16 @@ static void mlx5_ib_event(struct mlx5_core_dev *dev, void *context,
33453345
struct mlx5_ib_event_work *work;
33463346

33473347
work = kmalloc(sizeof(*work), GFP_ATOMIC);
3348-
if (work) {
3349-
INIT_WORK(&work->work, mlx5_ib_handle_event);
3350-
work->dev = dev;
3351-
work->param = param;
3352-
work->context = context;
3353-
work->event = event;
3354-
3355-
queue_work(mlx5_ib_event_wq, &work->work);
3348+
if (!work)
33563349
return;
3357-
}
33583350

3359-
dev_warn(&dev->pdev->dev, "%s: mlx5_dev_event: %d, with param: %lu dropped, couldn't allocate memory.\n",
3360-
__func__, event, param);
3351+
INIT_WORK(&work->work, mlx5_ib_handle_event);
3352+
work->dev = dev;
3353+
work->param = param;
3354+
work->context = context;
3355+
work->event = event;
3356+
3357+
queue_work(mlx5_ib_event_wq, &work->work);
33613358
}
33623359

33633360
static int set_has_smi_cap(struct mlx5_ib_dev *dev)

0 commit comments

Comments
 (0)