aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2019-08-07 15:32:36 +0300
committerDoug Ledford <[email protected]>2019-08-07 16:46:41 -0400
commite7e6c6320c8c9ed923250cd019e5f9ca0f59b4b8 (patch)
tree76d3a06903d1c97260318e8aed72ad231898adc9
parentd97de8887a12c598abc4d2e4e57a54c1f030e112 (diff)
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 <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Acked-by: Leon Romanovsky <[email protected]> Link: https://lore.kernel.org/r/20190807123236.GA11452@mwanda Signed-off-by: Doug Ledford <[email protected]>
-rw-r--r--drivers/infiniband/hw/mlx5/devx.c2
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;