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 3A759A04A6; Mon, 24 Jan 2022 01:07:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EEED442829; Mon, 24 Jan 2022 01:05:46 +0100 (CET) Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by mails.dpdk.org (Postfix) with ESMTP id 8F15F42813 for ; Mon, 24 Jan 2022 01:05:43 +0100 (CET) Received: by mail-pg1-f182.google.com with SMTP id p125so13661222pga.2 for ; Sun, 23 Jan 2022 16:05:43 -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=m6ukpPXGzMMkDwQfe3FB0t01WoHlsm0yvsUMJPP59MKD2E63axOvddxMY7gPLSvsfb 6EEmpn3QAKQFCv/bVJUg/RDjyExB/I2TqECXU2ORpL9Q/vmundnE1TgqoOB1iW25DWM1 fpnEeJXoe7dSa1X4fLSc2+oGnpJIzoZXePTgJKk2KfjGIa6JxH04tb5wYN8qVjuS2Yce ild66AgMekAOSGqovfKXTMU7lL2ojZLTSIOEfKoI3CWrnE08s3F/LixEo9vBJ1y6LdHb nGXbQQDkIuuoUSoJGMuMP6a8K0eQAQEE/xvLbyEFkeLd8F1Vw5mlEo8nVHT5tdp0bQRS wl+g== 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=yh7FBzaDttWBD6urB0DD6hzpI1v5z0fcwf2qw4dk3eiubAPYsBFcrrMjvhxz13Rta9 sjwk4QJmH+GP08j+/4/0zfYZxGJ3Zx4lsFf8g3QqoGRfmIMg3cddHItO8N8ltXPUhI6R 6EBqMEuay/n9kViwdJCmvg5orXTKC3eAYhG8UtUmYj3uiPS0icn4B0vKd41XFBSLogCs Wz2CMLiCGplZs6oWA4Dst1UjPr7ZRrfrMSEG0YnWOggdnHgpXoMNuKb3zpdv/a/pSW6A 1R0w1FByUNevAkZAXaHBzt1B1jyig6YuyIUgN84YaNyoUWTCNlSmJRQKMvXIr82GhPAn kbBg== X-Gm-Message-State: AOAM532quBki3JTDMszla73v67+uHLzaUC09lDyJhQt1teEVFzbb+N1q F9Ym9Tj9gFBLyxqYcXYdV8T+5qhuw4QwZQ== X-Google-Smtp-Source: ABdhPJxOaJPoFGKUNTjzpeqFTQv2xuV94UbDcPQw/W4FQJ9DIjWKVf9ScwTy1aYLmB7mqLT0ViVWYA== X-Received: by 2002:a62:7ecb:0:b0:4c8:6137:6f39 with SMTP id z194-20020a627ecb000000b004c861376f39mr5255386pfc.43.1642982742549; Sun, 23 Jan 2022 16:05:42 -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.05.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:05:42 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Rosen Xu Subject: [PATCH 20/82] bus/ifpga: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:16 -0800 Message-Id: <20220124000518.319850-21-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/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