From: Jiapeng Chong <[email protected]>
To: [email protected]
Cc: [email protected], [email protected],
[email protected],
Jiapeng Chong <[email protected]>
Subject: [PATCH] io_uring: Remove redundant NULL check
Date: Mon, 22 Mar 2021 17:31:59 +0800 [thread overview]
Message-ID: <1616405519-81817-1-git-send-email-jiapeng.chong@linux.alibaba.com> (raw)
Fix the following coccicheck warnings:
./fs/io_uring.c:5989:4-9: WARNING: NULL check before some freeing
functions is not needed.
Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Jiapeng Chong <[email protected]>
---
fs/io_uring.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 543551d..35e95ba 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -6001,8 +6001,7 @@ static void __io_clean_op(struct io_kiocb *req)
case IORING_OP_WRITE_FIXED:
case IORING_OP_WRITE: {
struct io_async_rw *io = req->async_data;
- if (io->free_iovec)
- kfree(io->free_iovec);
+ kfree(io->free_iovec);
break;
}
case IORING_OP_RECVMSG:
--
1.8.3.1
reply other threads:[~2021-03-22 9:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1616405519-81817-1-git-send-email-jiapeng.chong@linux.alibaba.com \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox