Skip to contentSkip to conversation

IB/mlx5: Check the correct variable in error handling code

PATCH Applied Dan Carpenter 4 participants 4 messages Aug 7, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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")
---
 drivers/infiniband/hw/mlx5/devx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/devx.c +1 -1
index fd577ffd7864..e24df414fd47 100644
@@ -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
Applied
#3 lore raw
In reply to Dan Carpenter
Quoted 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 events

over DEVX")

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