From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 36809A04AD; Mon, 24 Jan 2022 18:51:36 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2E53B42900; Mon, 24 Jan 2022 18:48:16 +0100 (CET) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mails.dpdk.org (Postfix) with ESMTP id 37A3F428EA for ; Mon, 24 Jan 2022 18:48:13 +0100 (CET) Received: by mail-pf1-f173.google.com with SMTP id e28so12224189pfj.5 for ; Mon, 24 Jan 2022 09:48:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gcywuAvsRBzYcqxW8NyRl7w7+GW1d4SBgXQVz1wk4c8=; b=IZOGnyFRVeovGbbnhmeMS6XJkGES7QA7H4shnzgYfWEITZBp0O3O7CfPERPAJ3Neth 71QE6HH+HXiKyYq4PUH11Y/O4Vi0fABuHZxbXxFXtJOwSY/7G7ChSSgkNjG7xtUkcjOs cfIZtynG/dA8pnVfT4U2nw35/pnBe4NgaIkLI4sXyk8Cni7sl+5mtxqkSgwv4unqLKL4 WXI5TLsBGB8HKQnS09BXt6EOnut4qBIiIgemkqQeNDvIlsOmbmgdZLnZ8XUZO4KqVqyV Sav8grcwBWCyRGpYlZ519E7olCIs1zH0TggRBxwXKyiL4nMkfUHPB3M4f/MzhvozdGvK YJwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gcywuAvsRBzYcqxW8NyRl7w7+GW1d4SBgXQVz1wk4c8=; b=Fa5JQvSxnUy5jBriXNSxW7+zKKhgY/eAc2WwgL4O8+6krueRffvrc31rERnpOzxmKu vv/JncHTqPd87vCc8eYG/YyqFzQco8n7rrb6Eu4ChbJK/PfSwZI6WXOSvNpodJAo0qJ2 v1LzkRnA+034sovz/JAU0Lciog315dFK3fbraVoMUAweocdVlPyGcsxUl6yIGf1gGS1m pJXF9bNsfNCDa3djNaIfCM20LWV6CftKimdGr9eJmYcG4vA064iiC08Tt4mTfBElgUDT ptTGfxr634asg7Yrrq70KLM1GzRGz+amao/EquFYwTGYh4SSBLoBY2GWisveoOKnC56y eK1w== X-Gm-Message-State: AOAM533FEPBBU4RU5kLGPSyZnPwa6RahYt8tKKImonV7HhcYP2ZTpj74 Q36x2ih/OfFfP16ZGrMU81H04hAZxwUvIA== X-Google-Smtp-Source: ABdhPJyxWSuxQsl9udgwV5Kas6MBODAddCgKh52ocpa3vsyeWawnRIxhobKFbvFCUMjLvsm6jU+MdQ== X-Received: by 2002:a63:8a42:: with SMTP id y63mr12678336pgd.251.1643046492228; Mon, 24 Jan 2022 09:48:12 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id q7sm15835082pfs.37.2022.01.24.09.48.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:11 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Hemant Agrawal , Sachin Saxena Subject: [PATCH v2 46/83] net/dpaa: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:42 -0800 Message-Id: <20220124174719.14417-47-stephen@networkplumber.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220124174719.14417-1-stephen@networkplumber.org> References: <20220124000518.319850-1-stephen@networkplumber.org> <20220124174719.14417-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Remove redundant NULL pointer checks before free functions found by nullfree.cocci Signed-off-by: Stephen Hemminger --- drivers/net/dpaa/dpaa_ethdev.c | 3 +-- drivers/net/dpaa/fmlib/fm_lib.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 2c2c4e4ebb5d..90208a31de26 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -463,8 +463,7 @@ static int dpaa_eth_dev_close(struct rte_eth_dev *dev) } /* release configuration memory */ - if (dpaa_intf->fc_conf) - rte_free(dpaa_intf->fc_conf); + rte_free(dpaa_intf->fc_conf); /* Release RX congestion Groups */ if (dpaa_intf->cgr_rx) { diff --git a/drivers/net/dpaa/fmlib/fm_lib.c b/drivers/net/dpaa/fmlib/fm_lib.c index 0d1ca12378d8..1d6816050c2f 100644 --- a/drivers/net/dpaa/fmlib/fm_lib.c +++ b/drivers/net/dpaa/fmlib/fm_lib.c @@ -408,8 +408,7 @@ fm_port_close(t_handle h_fm_port) _fml_dbg("Calling...\n"); close(p_dev->fd); - if (p_dev->h_user_priv) - free(p_dev->h_user_priv); + free(p_dev->h_user_priv); free(p_dev); _fml_dbg("Finishing.\n"); -- 2.30.2