Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp38501pxb; Thu, 21 Jan 2021 00:15:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdqiw77QUq7J9xmiEv3YW0445KcP5QPvuo9GYFzti0+PTk3s2/7sHVOOpaz4FW21Sxvlcg X-Received: by 2002:a17:906:7798:: with SMTP id s24mr8570025ejm.19.1611216916041; Thu, 21 Jan 2021 00:15:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611216916; cv=none; d=google.com; s=arc-20160816; b=GopVLFdzX+U2NK7HiXjRUlXyRR7aYMCLSPJg56IwCIGUVGa0hd0Q7HYiLmjK+0JTRw ouf1/QWoRSK9J+6r4LPD4mYLkFCkaDPTKxZWBeyb3ps9n/Nac5E/vgoyeeePmHe/HKLB XBAvpNFGgfMVr/7yr3msJSN5G6HoOJVnzJK5PVzZVctHOJxN9h0zNK1asVY/qpOzC7Bz 24uflZQA2mJiGAVaUncAX9Tpzw8Aq74tMLKwexhra4Qaf5kJqp0WUB1dD9yNKgQk7ZkH NvoOE7/dDbUnziMbcdsQ5v0rzzobnuj1o8DRqD0gSrx3VQp4Ls4QFZhOC2yZDNjOHZNU gjGw== 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=AUF5X8FNraaHXdZH4iDGleKSr1RU55vH2on4mZNgNaA=; b=xwPq9mT8SgDGv6vwDZOQwVgBXvpUILYtD3EeQX5XZYG82QraqGfOZbusViJdc2SHSh Pl6iJhdlU5kxqWnwjDEyuX1QZ+tHmhfXdj92QYWgNHdsSwrXq0zBk6Ljtm9i3FzqWWy4 /G7wtGGUkkWLS4E+zSYUnpZjfC7HybJuMSp6f0PrH5J5qQolU/lzUcjRiTudVYqjWI7b j3Lj0PjDj18R4oF/DqHTNo4dnabnEXIh6lH9YbsfKrJAEplQPt8A9AtbxG8SFI6aDMAM SFm9Xk7JU9q8lmsBVGBL7cv508valM2ZTwaPSf6u4XOXS/qzOoOnteQOrFGm+hKY94i9 KLXQ== 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 u19si1868517edo.452.2021.01.21.00.14.52; Thu, 21 Jan 2021 00:15:16 -0800 (PST) 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 S1726997AbhAUINw (ORCPT + 99 others); Thu, 21 Jan 2021 03:13:52 -0500 Received: from out30-56.freemail.mail.aliyun.com ([115.124.30.56]:36812 "EHLO out30-56.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727681AbhAUIN2 (ORCPT ); Thu, 21 Jan 2021 03:13:28 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=abaci-bugfix@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0UMPTkGS_1611216755; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:abaci-bugfix@linux.alibaba.com fp:SMTPD_---0UMPTkGS_1611216755) by smtp.aliyun-inc.com(127.0.0.1); Thu, 21 Jan 2021 16:12:43 +0800 From: Yang Li To: dyoung@redhat.com Cc: bhe@redhat.com, vgoyal@redhat.com, adobriyan@gmail.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Yang Li Subject: [PATCH] vmalloc: remove redundant NULL check Date: Thu, 21 Jan 2021 16:12:33 +0800 Message-Id: <1611216753-44598-1-git-send-email-abaci-bugfix@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 below warnings reported by coccicheck: ./fs/proc/vmcore.c:1503:2-7: WARNING: NULL check before some freeing functions is not needed. Reported-by: Abaci Robot Signed-off-by: Yang Li --- fs/proc/vmcore.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index c3a345c..9a15334 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c @@ -1503,11 +1503,8 @@ int vmcore_add_device_dump(struct vmcoredd_data *data) return 0; out_err: - if (buf) - vfree(buf); - - if (dump) - vfree(dump); + vfree(buf); + vfree(dump); return ret; } -- 1.8.3.1