Message ID | 20190807123236.GA11452@mwanda (mailing list archive) |
---|---|
State | Mainlined |
Commit | e7e6c6320c8c9ed923250cd019e5f9ca0f59b4b8 |
Headers | show |
Series | IB/mlx5: Check the correct variable in error handling code | expand |
On Wed, Aug 07, 2019 at 03:32:36PM +0300, Dan Carpenter wrote: > 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(-) Reviewed-by: Jason Gunthorpe <jgg@mellanox.com> Jason
On Wed, Aug 07, 2019 at 03:32:36PM +0300, Dan Carpenter wrote: > 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(-) > Thanks, Acked-by: Leon Romanovsky <leonro@mellanox.com>
On Wed, 2019-08-07 at 15:32 +0300, Dan Carpenter wrote: > 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> Thanks, applied to for-rc.
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;
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(-)