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

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@mwanda


Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent d97de888
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2026,7 +2026,7 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_SUBSCRIBE_EVENT)(
			event_sub->eventfd =
				eventfd_ctx_fdget(redirect_fd);

			if (IS_ERR(event_sub)) {
			if (IS_ERR(event_sub->eventfd)) {
				err = PTR_ERR(event_sub->eventfd);
				event_sub->eventfd = NULL;
				goto err;