IB/mlx5: Check the correct variable in error handling code
Subsystems (3)
PATCH 1/1 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]>
--- drivers/infiniband/hw/mlx5/devx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/devx.c +1 -1
@@ -2041,7 +2041,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;
Signature · 1 line
2.20.1
Quoted 7 lines · Dan Carpenter
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]>--- drivers/infiniband/hw/mlx5/devx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by Jason Gunthorpe <[email protected]>
Jason
Quoted 8 lines · Dan Carpenter
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]>--- drivers/infiniband/hw/mlx5/devx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks,
Acked-by Leon Romanovsky <[email protected]>
Doug Ledford
AppliedQuoted 6 lines · Dan Carpenter
The code accidentally checks "
event_sub" instead of "event_sub-Quoted 1 line
eventfd".
Fixes 759738537142 ("IB/mlx5: Enable subscription for device eventsover DEVX")
Signed-off-by Dan Carpenter <[email protected]>
Thanks, applied to for-rc.
Signature · 3 lines
Doug Ledford <[email protected]> GPG KeyID: B826A3330E572FDD Fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD