RDMA/uverbs: Fix a NULL vs IS_ERR() bug
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 May 2021 14:18:10 +0000 (17:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 May 2021 10:06:49 +0000 (12:06 +0200)
commit7cf4decefa0558ca000f1b6f01336e211b9ed052
tree8de4fc631a1607ebef2d881f4c0a87c535335805
parentc62c907ccc63b5ba59609ceecda1b04998d41962
RDMA/uverbs: Fix a NULL vs IS_ERR() bug

[ Upstream commit 463a3f66473b58d71428a1c3ce69ea52c05440e5 ]

The uapi_get_object() function returns error pointers, it never returns
NULL.

Fixes: 149d3845f4a5 ("RDMA/uverbs: Add a method to introspect handles in a context")
Link: https://lore.kernel.org/r/YJ6Got+U7lz+3n9a@mwanda
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/core/uverbs_std_types_device.c