Commit e7e6c632 authored by Dan Carpenter's avatar Dan Carpenter Committed by Doug Ledford

IB/mlx5: Check the correct variable in error handling code

The code accidentally checks "event_sub" instead of "event_sub->eventfd".

Fixes: 75973853 ("IB/mlx5: Enable subscription for device events over DEVX")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Acked-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Link: https://lore.kernel.org/r/20190807123236.GA11452@mwandaSigned-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent d97de888
...@@ -2026,7 +2026,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_SUBSCRIBE_EVENT)( ...@@ -2026,7 +2026,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_SUBSCRIBE_EVENT)(
event_sub->eventfd = event_sub->eventfd =
eventfd_ctx_fdget(redirect_fd); eventfd_ctx_fdget(redirect_fd);
if (IS_ERR(event_sub)) { if (IS_ERR(event_sub->eventfd)) {
err = PTR_ERR(event_sub->eventfd); err = PTR_ERR(event_sub->eventfd);
event_sub->eventfd = NULL; event_sub->eventfd = NULL;
goto err; goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment