Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3281449pxf; Mon, 22 Mar 2021 02:33:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySnoHnd8qYXZk+bKIj+7cAO1topAvL/BBXpCpIMnxYs19Sz1eZTqYNyzU+2a7nuf5JXCW1 X-Received: by 2002:a17:906:c210:: with SMTP id d16mr18107666ejz.187.1616405638806; Mon, 22 Mar 2021 02:33:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616405638; cv=none; d=google.com; s=arc-20160816; b=jKBDNw6GoOvx3kQYDPAszlpluZabEiblzkKN+zQULI2/VijTlTNXE5iKQySNnUqpq1 iYngMoa2uCrnjSbu7LoBL/WBEBOWkC4AzDtUEbYCLIT8iWFnRN/5GS8eyu78OH6VxgQc WJTOKOJ4GyY/8/vA7P2KeA4/yDsT5W0CiPGwZ2JkOj2trV5cWu5vdKg168u3Az1Z+85c 7XGSCNNuOaI9HAlJS10Ykw8wISPRKS6Mz9wIGDTYTxMz+GqxyGdU1KdIesMOaBHIDJEt B7gZvqNVM6zUcxsdLOMNgc2O/PL10udISWv1MJhUbSLJsNao1d/pVi9Vhzx2DHld+gXe qZAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=Xs5We2RSAqWPx2GPnd6nvwN43hOoJPksgEYAzFZl7C4=; b=e/mWE7FAF2ALnU/I7ZXtxXhJq51T3USQROPHeakJtfNvlLh3WBxodwLsL6ApJa10RG umjYVGHeozmZvTCfHrl8QEdb5iB3jOO5YInc64OMHuhSj6CrwJyF/Gth1GOztQX16xt3 xt4MlAq3tEfKTJMDxO1rJ1zNEOcl3OREFs/RPIq26RBi/rlPU/QBXHLsS/FtT0ioiJ8E X2lsekjDoUHzecg4GeHYo/GNrkcouuctykyf9KsMjCKhKXPfX+xeSYiVweibkMgJr5Fj yVXCIR1d+RCMC6YbVMsj4Dnyc4Xt5hY8A2qyuyfIFRGnNkXDz05t2m23pij3lGpjF38F 75QA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n19si10739114ejx.370.2021.03.22.02.33.36; Mon, 22 Mar 2021 02:33:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229893AbhCVJce (ORCPT + 99 others); Mon, 22 Mar 2021 05:32:34 -0400 Received: from out30-44.freemail.mail.aliyun.com ([115.124.30.44]:60029 "EHLO out30-44.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229591AbhCVJcQ (ORCPT ); Mon, 22 Mar 2021 05:32:16 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R981e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0USuX-9z_1616405531; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0USuX-9z_1616405531) by smtp.aliyun-inc.com(127.0.0.1); Mon, 22 Mar 2021 17:32:14 +0800 From: Jiapeng Chong To: axboe@kernel.dk Cc: asml.silence@gmail.com, io-uring@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] io_uring: Remove redundant NULL check Date: Mon, 22 Mar 2021 17:31:59 +0800 Message-Id: <1616405519-81817-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Jiapeng Chong --- 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