Linux block layer
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Jianchao Wang <jianchao.w.wang@oracle.com>
Cc: axboe@kernel.dk, viro@zeniv.linux.org.uk,
	linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, kbuild-all@01.org
Subject: [PATCH] io_uring: fix ifnullfree.cocci warnings
Date: Wed, 10 Apr 2019 08:16:54 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1904100815270.2799@hadrien> (raw)

From: kbuild test robot <lkp@intel.com>

NULL check before kfree is not needed.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

Fixes: b905f31ee046 ("io_uring: introduce inline reqs for IORING_SETUP_IOPOLL")
CC: Jianchao Wang <jianchao.w.wang@oracle.com>
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>

---

url:    https://github.com/0day-ci/linux/commits/Jianchao-Wang/io_uring-introduce-inline-reqs-for-IORING_SETUP_IOPOLL/20190409-194746
:::::: branch date: 17 hours ago
:::::: commit date: 17 hours ago

 io_uring.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2597,8 +2597,7 @@ static void io_ring_ctx_free(struct io_r
 		sock_release(ctx->ring_sock);
 #endif

-	if (ctx->inline_req_array)
-		kfree(ctx->inline_req_array);
+	kfree(ctx->inline_req_array);

 	io_mem_free(ctx->sq_ring);
 	io_mem_free(ctx->sq_sqes);

             reply	other threads:[~2019-04-10  6:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10  6:16 Julia Lawall [this message]
2019-04-10  6:25 ` [PATCH] io_uring: fix ifnullfree.cocci warnings jianchao.wang

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=alpine.DEB.2.21.1904100815270.2799@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=axboe@kernel.dk \
    --cc=jianchao.w.wang@oracle.com \
    --cc=kbuild-all@01.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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