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 3B3FFA04AD; Mon, 24 Jan 2022 18:52:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96ACE42927; Mon, 24 Jan 2022 18:48:22 +0100 (CET) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mails.dpdk.org (Postfix) with ESMTP id B48444291A for ; Mon, 24 Jan 2022 18:48:19 +0100 (CET) Received: by mail-pj1-f46.google.com with SMTP id q63so12481723pja.1 for ; Mon, 24 Jan 2022 09:48:19 -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=TUiUOlsaZaZctEtDskylav8EhMrScoEpL+u4Lmga9ypOoj05MXEuZRY2qu4IbXJNQc d2CpaYEkdWLyRaAj5kbqRZbN1+D/1N09cj2HupLdXgZU8du90/BrWWELz3JZ/nMrGDss KksP3xD/ZJNybTcNhEG3EM/M7ppCR6LYRXZoGaNhwd5hJIPVzcZWrSc65PlmVRVK901a FOBV0LevQU7Cn/Qkm+lqk8OOYAGN5xZ+DSNz34gxbCizxkd3Hjo3ITlJe28wudPiTe2k F3VQTITQBx90kJ84YHCS/FINcDnseHQkKMeekqIkm4jf/sBwIHiVZf8IdF26hrGe0ehG BFPw== 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=yKZgJY+H92dNG6ZL9Bhdk4xKuLP3QpjbVwo5R3dXhKvl9hfiNLYBIY8CxehmVRIgpp oovr3RGYZ5cO/DfsVn2CAEhyprG6cwT+UGEKWE4b3Qilkoh9h55F7x1a0vVhTnXlUCgh Z2jIAJmnaNhqMWKMRXcikgMLqnzlVbzn2kQ7bONZir5zFODDL+fT6r0F2/sGvjHzN3l2 k8Lu3BzZL+2MY8Kvfb2RWyl/O/ScUxEHxAQEu58TFICku1Z8FPIgTh6CLUjrNMYVdEOt jFcOzP5iYjTbaX3YKBiDvlrlUM+W50qXdmPN7Ui0A8+1pRIz9g+B+3DjYrV/lmOZn1b1 JYRg== X-Gm-Message-State: AOAM532wWGYt2oKagxC677wcZElUiI9MuKtgXTeQR+dADvuuh+pIyvfk GbCRUtx/0N65Y/Cl8yvbZWpUNT2upO6TWA== X-Google-Smtp-Source: ABdhPJwTdXi4EaKTfE/VT0ycaSVFcRUV0Y3FIX0zyhpruYm51NviCwDCW16j7ptzSTKAeOYGs2WRgw== X-Received: by 2002:a17:90b:3a8b:: with SMTP id om11mr2956462pjb.176.1643046498746; Mon, 24 Jan 2022 09:48:18 -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.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:18 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jingjing Wu , Beilei Xing Subject: [PATCH v2 52/83] net/iavf: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:48 -0800 Message-Id: <20220124174719.14417-53-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/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