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 CD4ABA034F; Mon, 24 Jan 2022 01:10:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E2A5F428CF; Mon, 24 Jan 2022 01:06:20 +0100 (CET) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id CCBA4428BB for ; Mon, 24 Jan 2022 01:06:15 +0100 (CET) Received: by mail-pl1-f182.google.com with SMTP id c9so13906965plg.11 for ; Sun, 23 Jan 2022 16:06:15 -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=DQv7enFJ6ztV7XCoRJU9M8z1Krc32VCDmmDK8E4865I=; b=UmTiF1B9PQa2/lnAVg0ghXbYrxNe5HI4gHtnGCJJL7VvvoCxPWspHAG1vnQlSl54N2 N479CgwwJiTyPkodt1oWB1W3Z0zKl6RgfE82lu7qVCKNNHBVVyKVuJ0WCJsLSqrXohx/ ES3JfpRwAriQpGbd+FkHYcT88xSUn+czrtBBhbebYfYWTTZlplVZkAX4aWy8O7mmjwcw sJalKyke85Q3VlMIpSnHqZDq8tKEaR4AI5++ntC6JK5ZB7YS+PwIO602eCzRmLv9tjUz D3wAv4SWjCyrRpGcpyd0IDyiX4fE24z14t2HubRd8uehOoea8X65R9+F5uVbN8sQQyzJ bpvw== 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=DQv7enFJ6ztV7XCoRJU9M8z1Krc32VCDmmDK8E4865I=; b=mIDAgLR2oYOQiP87zP+LRPpx/iFE1MNEfGaX/AUI8vjRmBPzYEJzL2Zu2exT8R28rk /wPKF09ZK8Hh87QcmCluQAGj/+R3eQXWySrtB9xwn7/Iehktc8ZBUD7pwaCG2wAggmng +4kMLTm0wy4LrzgShtSjsmY9WBn0ujI4ihiWC06MJdn8BPicISHcHaU+L3uKfvefERsD 0rQ3MDBuM/hETJHbIosKJ53r/mNUEUn4s1e72OpHt9XGQpxAHi0Q78ajiKpE2qf1OBob qqUYv//zNDd5NMqWRgaS5VGzpHoMtfOB3rHxBzxsWTmBE/7rekVMen7nEUoyKXJT8MHY L0zg== X-Gm-Message-State: AOAM533ZqeFutLIv18ZnhlUaEUsoGQm21o3uIh8EnK9EptwNcVNlYgZv kVWL8THpR3ogZdof3J9cOKK8WbkBpgLEVw== X-Google-Smtp-Source: ABdhPJyY3K/G/QYzcTAEJMD0FeGUxDOtkwlt2T/BYM5hfzrn79WMfJ+wYj1bPB5Vyow8rWjCXGSmwg== X-Received: by 2002:a17:90a:4042:: with SMTP id k2mr10583589pjg.88.1642982774781; Sun, 23 Jan 2022 16:06:14 -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.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:06:14 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jingjing Wu , Beilei Xing Subject: [PATCH 51/82] net/iavf: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:47 -0800 Message-Id: <20220124000518.319850-52-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/iavf/iavf_rxtx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 59623ac82094..dabe8cba7561 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -230,8 +230,7 @@ reset_rx_queue(struct iavf_rx_queue *rxq) rxq->rx_tail = 0; rxq->nb_rx_hold = 0; - if (rxq->pkt_first_seg != NULL) - rte_pktmbuf_free(rxq->pkt_first_seg); + rte_pktmbuf_free(rxq->pkt_first_seg); rxq->pkt_first_seg = NULL; rxq->pkt_last_seg = NULL; -- 2.30.2