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 60A8AA04AD; Mon, 24 Jan 2022 18:51:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F29D428F3; Mon, 24 Jan 2022 18:48:14 +0100 (CET) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mails.dpdk.org (Postfix) with ESMTP id EE9C3428E1 for ; Mon, 24 Jan 2022 18:48:10 +0100 (CET) Received: by mail-pg1-f170.google.com with SMTP id e16so6721724pgn.4 for ; Mon, 24 Jan 2022 09:48:10 -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=wDg5SMDcUa1LIz/hXRZsYHoriVWc+RGAiy3a0kXoYGQ=; b=ZfLJOA78jIUIxJzvG7dGt7krh+GeSQhYfCuBvnKDBqnPeszicRoZMFEjgT3llqLK/I 2aL/O5UXq8PRrknW18XurogKGhR/qi/5cv4P/hnSB8kficLIL8NSuy0yTH9T/OztWVzl Pviv9VuBj06YGSAQ7NbIdw+R3CsoQuUs67SUJ8NeqqIw8ZKkNYa8HeCdw3/ED3Ztm/qX HSL/A/nffhfiqPLFI4jMeF3nU8NVw5TXepoO7ktuLyspZ6qN9ADw9Hr0h37Hhyq5fl++ 0/hV2/GzakmyTWdtcH8k0oNnolMQSGgK5PHkg7Pp2KI3VmxelMFeH3Mn4XT4fhrWNzio P8Vg== 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=wDg5SMDcUa1LIz/hXRZsYHoriVWc+RGAiy3a0kXoYGQ=; b=PTcKvcHy+KeabNJrl4KvtfAnfncXdyu1sy/mhKo5YJx/rRq/sgEK6lo9PPxbTyiH/B qMFcIeTFhNVB9+x7ZM9SibkLRl+Ar4obfjhORBZUIxreNJFcA8KSd5HRgf0P2CP8ycfN lxqVBb8zDdLFZrtcg6RZ1Ti3V4guTpZXFaP+egG3V3Kk4flQWe2VgRV4kCgZAOY3KNmZ Ybyy23qd+no0jwplwvmeP9OYokS5KYGRHmsmfq6PK58SDzL3CJ6PkGkbH8ksQDJelv60 zGJAjLdvC4t3wMtWTqV6TdQN3EkKKqsVXf/0LQcbHbCGchcmVQUJ0iy0o0Ub7JbuamWU ALLA== X-Gm-Message-State: AOAM531G+p+ZkX7rWErkXsVZCpVsD9W2HHY6QSwKbSt3kunBGMtWN0rl O+gatsQY0QHVoKofPIT/fhHTtdaUX35m2g== X-Google-Smtp-Source: ABdhPJx6xXPM4C6ImYywys16HP4jCv4+YIfU8vRMtLTo4qhoG+8pmVRSKMT0mIFsMUJS9k0J0EndPQ== X-Received: by 2002:a63:1ca:: with SMTP id 193mr12342395pgb.497.1643046490033; Mon, 24 Jan 2022 09:48:10 -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.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:09 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao Subject: [PATCH v2 44/83] net/cnxk: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:40 -0800 Message-Id: <20220124174719.14417-45-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/cnxk/cnxk_ethdev.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c index 74f625553df4..d679a1f78501 100644 --- a/drivers/net/cnxk/cnxk_ethdev.c +++ b/drivers/net/cnxk/cnxk_ethdev.c @@ -934,10 +934,8 @@ nix_restore_queue_cfg(struct rte_eth_dev *eth_dev) for (i = 0; i < eth_dev->data->nb_tx_queues; i++) dev_ops->tx_queue_release(eth_dev, i); fail: - if (tx_qconf) - free(tx_qconf); - if (rx_qconf) - free(rx_qconf); + free(tx_qconf); + free(rx_qconf); return rc; } -- 2.30.2