um: Remove the unneeded result variable
authorye xingchen <ye.xingchen@zte.com.cn>
Tue, 20 Sep 2022 06:30:53 +0000 (06:30 +0000)
committerRichard Weinberger <richard@nod.at>
Wed, 1 Feb 2023 21:11:24 +0000 (22:11 +0100)
Return the value epoll_ctl() directly instead of storing it in another
redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/os-Linux/irq.c

index 98ea910ef87cd34b62338d2d90bb00d440f00273..cf7e49c08b210d7c0902b9e416955317f3f04584 100644 (file)
@@ -127,12 +127,10 @@ int os_mod_epoll_fd(int events, int fd, void *data)
 int os_del_epoll_fd(int fd)
 {
        struct epoll_event event;
-       int result;
        /* This is quiet as we use this as IO ON/OFF - so it is often
         * invoked on a non-existent fd
         */
-       result = epoll_ctl(epollfd, EPOLL_CTL_DEL, fd, &event);
-       return result;
+       return epoll_ctl(epollfd, EPOLL_CTL_DEL, fd, &event);
 }
 
 void os_set_ioignore(void)