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 46B72A04AD; Mon, 24 Jan 2022 18:53:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D6CD34299D; Mon, 24 Jan 2022 18:48:42 +0100 (CET) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mails.dpdk.org (Postfix) with ESMTP id B0BAE4298F for ; Mon, 24 Jan 2022 18:48:40 +0100 (CET) Received: by mail-pl1-f172.google.com with SMTP id u11so16310597plh.13 for ; Mon, 24 Jan 2022 09:48:40 -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=ISC9xgPa4xpnDbJdiyzvJcuRCL6fkiLJZQ9/yJT1A4THJ4bQEvjwDZ9rJMNtO72TCy rBRU5piqHJzDNB+Mitr7+0JUk8JPKhiHin9t1hQ9zHDGIrSnpAWpo0N8i9vxbSq4ClYJ NkJQKUbq4eta10AowcDSWZSJrUsTIO4X+GEc2mkjYyNR3UPDZxxuYO+4wEGT0ovquxje u+ssKJ3EYV9ObZQ69iJEgmDw6gqa2Y8wWr3quG60Z0zkCjqA2ZrPris6fKwDzUDySImp z5Sv5AG7ClNl2ZVXj01DuCZt1sXvGKNuiOj2cmwDhQnh/oHkQP0qL9XofsDvvZlOnNqR nz0w== 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=nT6DauSZ8MRYPZP25KpG4oJ+kPhAUiBHyiHDEPFiUoh+/OklHceE4mbA/4PLhlUzEq 06HSnpFdjG5H4w3XHsYkg9Rt3izYl61UfGPaDgiElvlESEGG++8TuVr2H75Ln3Pk9g6B MWazQWtQEI8mqMW1J4pZFQEDaHC1oidzlZCaSgco4mPp6gGmzfpYRyhmjoxBa82khUWf oiUf9C2Fmo6qmRgqNw2p/uYxVRks5xxNg7CpqcFgp9QPHv8+jVy8DQqK5Sv/kRvPpCC4 Cl0sHYguvXFzU6EU48QxyazL/6ZqiO3Fx4zswE92N6f13C+UoN0fCmSGtUcb/qyp0rRJ Yl3g== X-Gm-Message-State: AOAM530U2G9SC81nQU6VC9QRp0kFF0JQvxjedW0rmj0dPU6zELcvIaFx MyvajjGXG5XT8iyco3nafFztnPH5P34beQ== X-Google-Smtp-Source: ABdhPJz7g/o4dQ4NYSDaoXmgxwCf/n+QCFc41Xe7N314bUsDQFwm1whGkQMN/UyOUw0m95ALSx8xrQ== X-Received: by 2002:a17:902:ce8e:b0:14b:3589:6c30 with SMTP id f14-20020a170902ce8e00b0014b35896c30mr9566532plg.61.1643046519726; Mon, 24 Jan 2022 09:48:39 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:39 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Rosen Xu , Tianfei zhang Subject: [PATCH v2 71/83] raw/ifpga: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:47:07 -0800 Message-Id: <20220124174719.14417-72-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/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