[PATCH -next] RDMA/uverbs: Use PTR_ERR_OR_ZERO in ib_uverbs_create_cq()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>
---
 drivers/infiniband/core/uverbs_cmd.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index 8ee9e94..0d31cee 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -1051,10 +1051,7 @@ static int ib_uverbs_create_cq(struct uverbs_attr_bundle *attrs,
 				sizeof(cmd.comp_channel),
 			ib_uverbs_create_cq_cb, NULL);
 
-	if (IS_ERR(obj))
-		return PTR_ERR(obj);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(obj);
 }
 
 static int ib_uverbs_ex_create_cq_cb(struct uverbs_attr_bundle *attrs,








[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux