Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1254789ybi; Wed, 17 Jul 2019 12:02:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrpB/vKfuzfnnZZuAK/utSZs6vGpWF1dgQz7KDD3h2EPveCxfCNKBmEYDvmnStYJlMz0o4 X-Received: by 2002:a17:902:8c98:: with SMTP id t24mr46299932plo.320.1563390139465; Wed, 17 Jul 2019 12:02:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563390139; cv=none; d=google.com; s=arc-20160816; b=j6XRyvPdHBSzJKhvR4ywFA3Ls4W5/LxMMp9JKU70h1VpiZKn9cC856jeybWGobVewc KC3mnbj9/yVtbZJw1cDb7B0khiLDmxZZ5L0GY1+/u4HoSSxIOVjievy0m9ySXREQStr1 AOxvLmAR8SBZDbhmi+uRiE3EGtOhbB//bD+jpzCMFG0SupaKlxKKyAITfNRG1TbnjREP 11j2eOBtAAHGp8QQLe4VNBg+Cfkd49PhGoiBo/bBgA8xlEEnRy/5InH1WGm79SJuUMNZ +j7tCekYvstOmm+ZHEDWf5aZnoaqEZsi1pMHPPohtKJlLrGOudfAYxwOcnzs5pIb/rSs kIfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=lAKLWxs9BmXAnTWXPzWx+Wn+pzFM1kNxr9/WwTks2+M=; b=TMmJetltwTLpIKilon2G62dC0GBO9GCtsZaQkm7zQCxlzWdnHbOBm+l7Ml2l+D2DYj e6uwToG20+psC4eTQxVpyE5adMhD1MCu3ftqmhUAl7rz0GqidAqPbmiKvMb0W9TCwwEm LJFFJlRC9D4cyPwx24x5fMR8/NvdH5HJ3Q89Tw6Ext0dJOoRwTc7Nyqwmwk2haVrZEqk +x2HsGCIiOwCpKZyC9pgsWmJeshyPTrLKaFMy+xB3fXX1QXnxbNhhMw9kH1BkOU7EtBC 2iVf90yMlaC6cW1QTBNsX9/5emF20cd4uUei4OLLcXD0Q+STKDaRqRmw4pNarqBO5W2F ySJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cd16si23378546plb.72.2019.07.17.12.02.02; Wed, 17 Jul 2019 12:02:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727280AbfGQTBd (ORCPT + 99 others); Wed, 17 Jul 2019 15:01:33 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:40850 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfGQTBc (ORCPT ); Wed, 17 Jul 2019 15:01:32 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id E52A11264E7C3; Wed, 17 Jul 2019 12:01:31 -0700 (PDT) Date: Wed, 17 Jul 2019 12:01:31 -0700 (PDT) Message-Id: <20190717.120131.1614957687610581259.davem@davemloft.net> To: hariprasad.kelam@gmail.com Cc: vyasevich@gmail.com, nhorman@tuxdriver.com, marcelo.leitner@gmail.com, linux-sctp@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: sctp: fix warning "NULL check before some freeing functions is not needed" From: David Miller In-Reply-To: <20190716022002.GA19592@hari-Inspiron-1545> References: <20190716022002.GA19592@hari-Inspiron-1545> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 17 Jul 2019 12:01:32 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hariprasad Kelam Date: Tue, 16 Jul 2019 07:50:02 +0530 > This patch removes NULL checks before calling kfree. > > fixes below issues reported by coccicheck > net/sctp/sm_make_chunk.c:2586:3-8: WARNING: NULL check before some > freeing functions is not needed. > net/sctp/sm_make_chunk.c:2652:3-8: WARNING: NULL check before some > freeing functions is not needed. > net/sctp/sm_make_chunk.c:2667:3-8: WARNING: NULL check before some > freeing functions is not needed. > net/sctp/sm_make_chunk.c:2684:3-8: WARNING: NULL check before some > freeing functions is not needed. > > Signed-off-by: Hariprasad Kelam Applied.