]> www.infradead.org Git - users/hch/block.git/commitdiff
simplify io_uring_cmd a bit
authorChristoph Hellwig <hch@lst.de>
Fri, 6 May 2022 06:01:43 +0000 (08:01 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 6 May 2022 06:01:43 +0000 (08:01 +0200)
No need for an else after a return

fs/io_uring.c

index 86e1af89b5cb4b1dc93e8ef39652bc409eb1bf1e..8afa62ec6bc21ed8345ad6a2835f872e2408886b 100644 (file)
@@ -4990,9 +4990,9 @@ static int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags)
        ret = file->f_op->uring_cmd(ioucmd, issue_flags);
        if (ret == -EAGAIN)
                return -EAGAIN;
-       else if (ret != -EIOCBQUEUED)
-               io_uring_cmd_done(ioucmd, ret, 0);
 
+       if (ret != -EIOCBQUEUED)
+               io_uring_cmd_done(ioucmd, ret, 0);
        return 0;
 }