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 9B8E2A04AD; Mon, 24 Jan 2022 18:49:29 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 84D4342862; Mon, 24 Jan 2022 18:47:48 +0100 (CET) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id B02F942850 for ; Mon, 24 Jan 2022 18:47:45 +0100 (CET) Received: by mail-pf1-f182.google.com with SMTP id p37so16668942pfh.4 for ; Mon, 24 Jan 2022 09:47:45 -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=JsSGuL3hE0Kx6NbddGKHLMFrZW0o8WLTr/PaEiefI4o=; b=l2wANMFaPaJ4TpN3xtBkU0FV3qfX0I9/7yvcjeqw1pIt3TDh6RxHeexsOAAyfQoF5r AMwQmIDUJJfRfqRdiGlxcKXeAA2YwMBVYY6hOlWORYS9DgbYoCfa/H1PWFKxivGyi2h9 sRhQSPRKL94O2aIpjqY5NLp/t6n6M9Fms2XYNJGR8SF2z2e0BbgTAgGbpL19znaVyF4N G3LoApRiSPAXgw95fwbCKi9XsLHtO/V8h0Dx9+TUuNQS8y6Lw1RtNWSVTnbCruKC882q wHFUfsb0UAwGxLiazTfVNcvdIQYd3oVokTExey7o577KZkNW9aTkt+jnpMlAUrDrIzBX SbAg== 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=JsSGuL3hE0Kx6NbddGKHLMFrZW0o8WLTr/PaEiefI4o=; b=DCQPoFnDtQrWt//5kNzWTTMh8w1PuVSgG9OqglZUJ5sv5eQzqlVBfDjHcSGsJG36j1 BCl570mDlEdZoBCNnFfrHQ3IeESjKhhjKbFfJgz23/57ei22nZC7/3vH8n8PRQpLfPk5 r9MU8fktcnnKTbTRcwGavN7xm0XOGq/sk3/UNp7KqIjicZ1S+rtGwQ+lEssR8OgQkBfV TCe6yg2vk5HfJDpkTpFxux8Ueu9DN5wDpk0Lm438HcnORQ+qz528+7EkzOMdA56oLek3 6HVpisNyaRHMyHjI1UYyESTMo79VFpW6SUl1LmW1uhossAx0LomvNJ2YqSaUZ8fSSSUO 0gdw== X-Gm-Message-State: AOAM532sG8PkXWIToXzN51CzjWxbtT/txJaL39y7EUKXg1FFkd+xqwNK x4oS8zYFAk40+jvQDzYKcuWOd5RKu2U56Q== X-Google-Smtp-Source: ABdhPJzaoSApZk/JWohLc+4d9ZBze09MxP9fpM4FNz+sYGXDO5+5XHoVLrf+H5c8GfdRTWJ5MLzUwA== X-Received: by 2002:a63:1f07:: with SMTP id f7mr12529347pgf.219.1643046464603; Mon, 24 Jan 2022 09:47:44 -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.47.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:47:43 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Rosen Xu Subject: [PATCH v2 21/83] bus/ifpga: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:17 -0800 Message-Id: <20220124174719.14417-22-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/bus/ifpga/ifpga_bus.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c index c5c8bbd57219..e005f2cb70b3 100644 --- a/drivers/bus/ifpga/ifpga_bus.c +++ b/drivers/bus/ifpga/ifpga_bus.c @@ -191,10 +191,8 @@ ifpga_scan_one(struct rte_rawdev *rawdev, return afu_dev; end: - if (kvlist) - rte_kvargs_free(kvlist); - if (path) - free(path); + rte_kvargs_free(kvlist); + free(path); if (afu_dev) { rte_intr_instance_free(afu_dev->intr_handle); free(afu_dev); @@ -254,10 +252,8 @@ ifpga_scan(void) } end: - if (kvlist) - rte_kvargs_free(kvlist); - if (name) - free(name); + rte_kvargs_free(kvlist); + free(name); return 0; } -- 2.30.2