net/mlx5: Report a CQ error event only when a handler was set
Report a CQ error event only when a handler was set. This enables mlx5_ib to not set a handler upon CQ creation and use some other mechanism to get this event as of other events by the mlx5_eq_notifier_register API. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Acked-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
This commit is contained in:
parent
38164b7719
commit
70a43d3fd4
@ -503,7 +503,8 @@ static int cq_err_event_notifier(struct notifier_block *nb,
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
cq->event(cq, type);
|
||||
if (cq->event)
|
||||
cq->event(cq, type);
|
||||
|
||||
mlx5_cq_put(cq);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user