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 6CCBAA04A6; Mon, 24 Jan 2022 01:11:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EFF9E4292F; Mon, 24 Jan 2022 01:06:39 +0100 (CET) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mails.dpdk.org (Postfix) with ESMTP id 8B7564291C for ; Mon, 24 Jan 2022 01:06:35 +0100 (CET) Received: by mail-pf1-f174.google.com with SMTP id n32so5133012pfv.11 for ; Sun, 23 Jan 2022 16:06:35 -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=PVNto2xv4wjyh/dpNuE2+eGz0mBChs+YqMwWd+Xh0h4=; b=zVSHYZW62mwLsKvkosj8mQmTwpqrwFQjxLpfftJYAqYl6+RLBcYqiWSwVtPRhJLMo5 tJJaHF8K3LfzztqORrYC8YxAMCgUWAfehWgzS202UM8LwRpSgRmMYRuLnDCJ8Id3ex1s lAiEqXhOegMSavkbwc1GLFimtGHC/awajJ865rOki0vSGJRjAr6B2ePdSt5Cmq2OdmzA tmTh01rYuhlDNJNv3UY1VHD40HOATgtOADBe2Z+Er87OCfCh/JiH71fdT12FITAAfJXa 2GfxaJxCaxfzqHqC5F1i4FR1svKn1+IwfwtP23kgmFH7k3ZVWahXIdSu81nGlB0V6Ei5 S3xg== 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=PVNto2xv4wjyh/dpNuE2+eGz0mBChs+YqMwWd+Xh0h4=; b=VtTrQmgAAVL22NOqLSmlmgeFde5Ve4wnrVXSS0sM5SU4KVklc98lla/wBTtl7dBR/w BAZVg4hBaJOa59kND5zaJchxOx3kHo2maV51c+5wBSw8+/67FrfU8KsV7D+ITJ/ASJ3D ihbQ+3dnnmkBQtCLp7R+BDqhPwOKTZvnKiGOd9TQ2Gur6VMVrVrLC1H6wJhYTWo8SgF6 Ci4Gwt4JEBFKjn9U+DCDl/iuYJCEtBf6DQ3wq42xSy5oqn81yaiejBActd8r45sqT2rx r5/aSkMeuoA3AReXLfHC2nY5fWYY+ajwBPZnF6w+LI/mMY7MbkMV02E7mtNgSYC3yfXx lRhA== X-Gm-Message-State: AOAM533jrUxZFiNnLFz/P+Zs5o1qRL9seeZ7c4Apz2wp7SWk1F7SW7FD ZD7jR5AM0qdrn113+aZkymb5OGmjoB1vzQ== X-Google-Smtp-Source: ABdhPJysJy6uq9DuVlAaRblGejhug+T2HcfEAOJcACNpvlAvpyQSIpB++ncs9GmYyaAUbVkAe9k3Zw== X-Received: by 2002:a63:8748:: with SMTP id i69mr10367883pge.422.1642982794596; Sun, 23 Jan 2022 16:06:34 -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.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:06:34 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Rosen Xu , Tianfei zhang Subject: [PATCH 70/82] raw/ifpga: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:05:06 -0800 Message-Id: <20220124000518.319850-71-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/raw/ifpga/ifpga_rawdev.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c index 0eae0c9477b6..c68e378dc3ce 100644 --- a/drivers/raw/ifpga/ifpga_rawdev.c +++ b/drivers/raw/ifpga/ifpga_rawdev.c @@ -836,8 +836,7 @@ rte_fpga_do_pr(struct rte_rawdev *rawdev, int port_id, } free_buffer: - if (buf_to_free) - rte_free(buf_to_free); + rte_free(buf_to_free); close_fd: close(file_fd); file_fd = 0; @@ -1739,10 +1738,8 @@ ifpga_cfg_probe(struct rte_vdev_device *dev) ret = rte_eal_hotplug_add(RTE_STR(IFPGA_BUS_NAME), dev_name, devargs->args); end: - if (kvlist) - rte_kvargs_free(kvlist); - if (name) - free(name); + rte_kvargs_free(kvlist); + free(name); return ret; } -- 2.30.2