[PATCH liburing v1 4/5] register: Remove useless branch in register probe

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

 



From: Ammar Faizi <ammarfaizi2@xxxxxxxxxxx>

IORING_REGISTER_PROBE doesn't return a positive value. This branch is
useless. Remove it.

[1]: io_probe

Kernel-code-ref: https://github.com/torvalds/linux/blob/v6.1-rc6/io_uring/io_uring.c#L3608-L3646 [1]
Signed-off-by: Ammar Faizi <ammarfaizi2@xxxxxxxxxxx>
---
 src/register.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/register.c b/src/register.c
index c66f63e..6075f04 100644
--- a/src/register.c
+++ b/src/register.c
@@ -219,11 +219,8 @@ int io_uring_register_eventfd_async(struct io_uring *ring, int event_fd)
 int io_uring_register_probe(struct io_uring *ring, struct io_uring_probe *p,
 			    unsigned int nr_ops)
 {
-	int ret;
-
-	ret = __sys_io_uring_register(ring->ring_fd, IORING_REGISTER_PROBE, p,
-				      nr_ops);
-	return (ret < 0) ? ret : 0;
+	return __sys_io_uring_register(ring->ring_fd, IORING_REGISTER_PROBE, p,
+				       nr_ops);
 }
 
 int io_uring_register_personality(struct io_uring *ring)
-- 
Ammar Faizi




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux