mirror of https://gitee.com/openkylin/linux.git
IB/mlx5: Check the correct variable in error handling code
The code accidentally checks "event_sub" instead of "event_sub->eventfd".
Fixes: 7597385371
("IB/mlx5: Enable subscription for device events over DEVX")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Link: https://lore.kernel.org/r/20190807123236.GA11452@mwanda
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
d97de8887a
commit
e7e6c6320c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue