From patchwork Wed Apr 10 06:16:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 10893227 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 49DE914DB for ; Wed, 10 Apr 2019 06:16:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 290AF289BA for ; Wed, 10 Apr 2019 06:16:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D4B1289E5; Wed, 10 Apr 2019 06:16:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1138F289BA for ; Wed, 10 Apr 2019 06:16:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727073AbfDJGQ5 (ORCPT ); Wed, 10 Apr 2019 02:16:57 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:33803 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726230AbfDJGQ5 (ORCPT ); Wed, 10 Apr 2019 02:16:57 -0400 X-IronPort-AV: E=Sophos;i="5.60,332,1549926000"; d="scan'208";a="377960196" Received: from abo-75-106-68.mrs.modulonet.fr (HELO hadrien) ([85.68.106.75]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2019 08:16:54 +0200 Date: Wed, 10 Apr 2019 08:16:54 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Jianchao Wang 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 Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: kbuild test robot 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 Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- 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);