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 A5F3DA04A6; Mon, 24 Jan 2022 01:09:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 66E9E4289D; Mon, 24 Jan 2022 01:06:13 +0100 (CET) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id 997E1428A9 for ; Mon, 24 Jan 2022 01:06:09 +0100 (CET) Received: by mail-pf1-f169.google.com with SMTP id a8so8884046pfa.6 for ; Sun, 23 Jan 2022 16:06:09 -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=SDNhgjlLRRiz3hW+k/dE/sBv73GQveXkMXS7hHKjkTowUNZxdHJPuu0IUJgrH/17sz 39wlGLTY5Do0sdGcorDiK7fgKlWxbEzhEhIkb17gBBIzuMIth4s3rPmqBnAlQfD64ESW HdirBR/6GHCnV3B6C5jWsc9cHaITzaCskxhpx9Ha7sIWLRf5y2AsCNSK9OcNeMgaNujs W2IxAG/Idau17QvfGgWkx9o/kQZ6y5Z4tPNErBfIcgaWsRdAFQSSOEOtU3/U712xKEiQ AcYlZZHWjR6D4P4M9QFz+vZ97SMpCYZ0KEXrNTBqxZ7cr0chXR9Y4KA+1tmRSZgK8MB6 qBgQ== 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=pido6n512auROxvJCc8jAHKWUNvd0O5ptaSfb8FazHksh1DEx46ZX4Q3WUXzQgVUTm 79kmQiHnEcyewb4JNecym0Eg6UjJNp1XEFTJpGp5WJRqj1A3LxFHJWDnpwChEsC5e6pD 9/yzfCBqQ1G2e0VY0leAJ25EbVBYdX1tYIU+9OQvxlllpQ6UztyV5DpLcXF4tkRjSa/d 9Gp0W9+xoVCKDoEZN2WbRapGSfUN8mPeFM5b2vYZv0MoJQTc5tdNDQF8wtJFtWNU8I9x KVsN0HK/233cIyeanfodXOHZ93QHbsTDBIlqfkSyLPNimFgUcWlJWfjtMdBi7Piv6f0S Do5w== X-Gm-Message-State: AOAM531wQLtXdtQYGjJx8W6AOMFUm+WqkaKrTKWsejLs0CQIAlfEinTW WjSA3iNOpFjb5v82VQXJIEnk5qIvyXi0Vw== X-Google-Smtp-Source: ABdhPJyr1TMzgAG0QrkjAtmZwl6geRRdoO6yimpVmciedP9oYDlTumU4mZM6wwHM8Lw0kreJn7T5DA== X-Received: by 2002:a63:aa46:: with SMTP id x6mr10236783pgo.10.1642982768589; Sun, 23 Jan 2022 16:06:08 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id ck21sm10935350pjb.51.2022.01.23.16.06.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:06:08 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Hemant Agrawal , Sachin Saxena Subject: [PATCH 45/82] net/dpaa: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:41 -0800 Message-Id: <20220124000518.319850-46-stephen@networkplumber.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220124000518.319850-1-stephen@networkplumber.org> References: <20220124000518.319850-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