All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] IB/mlx5: Check the correct variable in error handling code
@ 2019-08-07 12:32 ` Dan Carpenter
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2019-08-07 12:32 UTC (permalink / raw)
  To: Leon Romanovsky, Yishai Hadas
  Cc: Doug Ledford, Jason Gunthorpe, linux-rdma, kernel-janitors

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>
---
 drivers/infiniband/hw/mlx5/devx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/mlx5/devx.c b/drivers/infiniband/hw/mlx5/devx.c
index fd577ffd7864..e24df414fd47 100644
--- a/drivers/infiniband/hw/mlx5/devx.c
+++ b/drivers/infiniband/hw/mlx5/devx.c
@@ -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;
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-08-07 20:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-07 12:32 [PATCH] IB/mlx5: Check the correct variable in error handling code Dan Carpenter
2019-08-07 12:32 ` Dan Carpenter
2019-08-07 12:59 ` Jason Gunthorpe
2019-08-07 12:59   ` Jason Gunthorpe
2019-08-07 13:15 ` Leon Romanovsky
2019-08-07 13:15   ` Leon Romanovsky
2019-08-07 20:47 ` Doug Ledford
2019-08-07 20:47   ` Doug Ledford

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.