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 67DFFA04A6; Mon, 24 Jan 2022 01:09:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27978428B2; Mon, 24 Jan 2022 01:06:11 +0100 (CET) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id 233EA427D1 for ; Mon, 24 Jan 2022 01:06:09 +0100 (CET) Received: by mail-pl1-f173.google.com with SMTP id x11so8143076plg.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=wDg5SMDcUa1LIz/hXRZsYHoriVWc+RGAiy3a0kXoYGQ=; b=1QAT4UTU1ERqmwUqRmUAuAmPrAhMJ5BSDfMwC84ndldXZ5MTlWT6rXf/ljNIP/lh3K yIEmCB56iXiwr3xotePdXaDjSsm4WguzAqSFnCWO+sXqQMiU/jx71xuDgviiiSfqfYZi nhCfHu44IYVGtjQFVtQjknVLjRP8lL3z4mHEthbYkxEYhzcoFLfBjoIOtFArGZCMSBOI /kpszHgDP2NaJCi7Hzigs/lMZ1OqMkbvW8y/GrJXwL3OqRhKcWaQkD6S23uIkzIUP5xB YNVd1ppnKFyDNzi41kE4zxn4kiQtLroWOCdBih0Iuxf1f8ekp6XnaU6VghEgyDUonTGh J0KA== 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=vGt/qsDds9YQQkcCHbNaKLVQOvMCBlFqpi9tebwUEEfE4cnrwvoZShf3B+gDQNfNyH B7uiM6Wk5hxzo0sWNk3hQqfMoLwniYe6RxfsQeQTp5WiLotNG5WKI4K+ehcJ9WFS205q 8WZKUqTygrLB+tWq+6pWXiDXG738PiM0+Kxh7vUuZU35zZgY3XMgiMQ9SMiGrQkJdFpU lsV7fukI0RlVAGHYOiKGNaPSmKMd+AT58LCvsfymZ7NxbaySx8KsMbLqN7TU1JhG2Kio UA+LgOlhlZzX7FTWjmZta87DnkUT/prNMys8ADJ7cvDvl0qTZMq35QAo5njHAR8uUNhi Eotw== X-Gm-Message-State: AOAM530498WyPEyN4zQUBXurDvFyx8glHiy6VGvb+rQttzvuRl1e7u2u ocT5dum2JqJmz/sOTFfHhoq2yYtA7Ha00g== X-Google-Smtp-Source: ABdhPJzzyTnQiNbQ1+HhnyRzl4tbcq5mmrFQdBrLo8SnCUtRsq9MfVimIJRspGqPMBdb9iqpfoq2aA== X-Received: by 2002:a17:903:2288:b0:14b:2764:8ff9 with SMTP id b8-20020a170903228800b0014b27648ff9mr9239892plh.105.1642982766611; Sun, 23 Jan 2022 16:06:06 -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.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:06:06 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao Subject: [PATCH 43/82] net/cnxk: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:39 -0800 Message-Id: <20220124000518.319850-44-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/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