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 39421A04AD; Mon, 24 Jan 2022 18:52:18 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 85C5E42934; Mon, 24 Jan 2022 18:48:24 +0100 (CET) Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mails.dpdk.org (Postfix) with ESMTP id 1F4B342925 for ; Mon, 24 Jan 2022 18:48:22 +0100 (CET) Received: by mail-pj1-f49.google.com with SMTP id g11-20020a17090a7d0b00b001b2c12c7273so212067pjl.0 for ; Mon, 24 Jan 2022 09:48:22 -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=lqEmHHbt20bwHdbrFxnlIeL+a+rOHfMeJHOWjp0QSw8=; b=B/FLWy/gsFnEx2z0Sfx3Dxnkmz4k9qwk7lhueo5L3Et4Wd1sYP54x12RyI4ycmBkWs msnAycuBTgXl7U329Dq5GzdwlypkimC+A4uD8HyAgEC41bqr7gs/MqbCbHk88g50Et5r YA3Bz/O5WygOkvtmfuPixBM5OA87Pz091yHb7ojYW9BCW20T9nFVGLFwNMyLXP94wlIq 0vGlJls3c+pQ1fuskCKubWekwSNoUFtqavvazgQDXWNV7UnIl1dj5n+4goBEEfb4qSbK 9gkJoHlQidWsf86kI4sCd31kfYeIcUdhM7xbo7zNPrEPdrXRYfQ6NlzJ5HSzdoxYzl7S l7Gw== 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=lqEmHHbt20bwHdbrFxnlIeL+a+rOHfMeJHOWjp0QSw8=; b=S/3WqDW2uFKACGBBxWXSjKXoczSI5zuzfIog35cjzvEh69OdbfHrKSVRwelwI3VwJu 5/oMBNJOaDYRw2jTwecc7vzbf3Ubg2xozRlMwWwoJY3smvO5vfxi7Syx9lQ4PNjR/iYN ZWtbjGzwBb55wGE+tx7IBDtsZse6c2ZJsvSfHWEKsvkcNu12V/DN1M/B+iep11N3rZYO 7MpAzLjMMRvXhlQo8Dgz0vO7a9I6Hs7UVBwlbyMyvb3Hxx5Pt1lzh+8utLGC4z2F7mGN 3lIxJWjIoC38VHvnzVUpM4qMI2hkDStHm8d+YdtoVZpavM/Mf6cKlAObkIhPzSSnmPNh WmaQ== X-Gm-Message-State: AOAM5313WxNdC/XQuauebrKAIddnm+YL0ihU7hyCAxq1CZy2+25j7Mjq 4Ytf9JuxnHH39ER+g1pLJGowkyjW5S1AiQ== X-Google-Smtp-Source: ABdhPJwcWkUZZWf7i8aZfPbOw75OptzyH47Lr65QXPVVl3+knPmGdPw0AIHany/Vmfc0yXzrpJzWNg== X-Received: by 2002:a17:90a:8045:: with SMTP id e5mr2932081pjw.97.1643046500820; Mon, 24 Jan 2022 09:48:20 -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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:20 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Haiyue Wang Subject: [PATCH v2 54/83] net/igc: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:50 -0800 Message-Id: <20220124174719.14417-55-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/igc/igc_flow.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/igc/igc_flow.c b/drivers/net/igc/igc_flow.c index 66053060af5a..58a6a8a539c6 100644 --- a/drivers/net/igc/igc_flow.c +++ b/drivers/net/igc/igc_flow.c @@ -775,10 +775,7 @@ igc_flow_create(struct rte_eth_dev *dev, } if (ret) { - /* check and free the memory */ - if (flow) - rte_free(flow); - + rte_free(flow); rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_HANDLE, NULL, "Failed to create flow."); -- 2.30.2