diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-08-07 15:32:36 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2019-08-07 16:46:41 -0400 |
commit | e7e6c6320c8c9ed923250cd019e5f9ca0f59b4b8 (patch) | |
tree | 76d3a06903d1c97260318e8aed72ad231898adc9 /drivers/infiniband/hw | |
parent | d97de8887a12c598abc4d2e4e57a54c1f030e112 (diff) | |
download | linux-e7e6c6320c8c9ed923250cd019e5f9ca0f59b4b8.tar.bz2 |
IB/mlx5: Check the correct variable in error handling code
The code accidentally checks "event_sub" instead of "event_sub->eventfd".
Fixes: 759738537142 ("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>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/mlx5/devx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/devx.c b/drivers/infiniband/hw/mlx5/devx.c index ec4370f99381..2d1b3d9609d9 100644 --- a/drivers/infiniband/hw/mlx5/devx.c +++ b/drivers/infiniband/hw/mlx5/devx.c @@ -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; |