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 C70BAA04AD; Mon, 24 Jan 2022 18:53:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 55CB34297C; Mon, 24 Jan 2022 18:48:39 +0100 (CET) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mails.dpdk.org (Postfix) with ESMTP id C58C14288F for ; Mon, 24 Jan 2022 18:48:36 +0100 (CET) Received: by mail-pl1-f175.google.com with SMTP id y17so5961641plg.7 for ; Mon, 24 Jan 2022 09:48:36 -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=JoXl9Uk1M4K/Z8qQv8SBHuUcSVhoJbVr0MBB/3TJed4=; b=cKNI0zU2yejr9/+O/fjWYcAeRzynfjo0rtq31AGwDdtSyVKyfnOv3VEAtLYaV04Idh OprDsYeQYakt7UqpudHnxmhm3D4SbnjCOPyW4u6uwSueUkb6zNnsUyNYKNPIX9rRlejK nmUCYR1+iFdSR1oa/uzwUiX8reMSevFJQZx0t07R+MpOBRnUnYp/ij7ZWEr6VNVgaThW z4R3/6kNkDFpA1QPFgcgrW/OfspAYjDP4BWv7qHfyhOZjP2odEEnOC3QwU1AR3wHL2qm UVZTgtC/cI53P4fwuL+g0GXAI1xR35JGX+ON6p94tsMivuGLy0sunU/Axsly7cwywLWl yFzw== 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=JoXl9Uk1M4K/Z8qQv8SBHuUcSVhoJbVr0MBB/3TJed4=; b=N5vUuavkEeoe4hmWuqslm559+NsOsfbOyrZAfVWbL7iUzli8eZiuIca/Fp1W2a6ERR PBqfkfPE9taofMvJw1PIiohnQ37EzH+XeGZihZu2sieiic9LchhOWOk/5NcYux5dXtoR Fj1whxKkC9vsjOVl3nj6LiTT+B39/mq58lrcy6mCH493865770iFk4xykIsz3/cQRNiw 7Ct/x3hfaC7LmEmJJgDtTouS9/5EDIHMJkK08QSfYKqyNHR387xRGMVj0kgIUcFiIapW DjP07cUcVXiYIEKjmo9gH7IYGCBTLpncHITpA9aP7YrbmgZwsf+CMbN5g2BP0LfJg3Uz zjdw== X-Gm-Message-State: AOAM530Dw0184iKbXH3ZAlvdC0Cyhw+jlwnxxtGgEHzxa+XcIhIT4ZuL 471I2+DIYJYYVS8LRrmfahWx25cjNZfOig== X-Google-Smtp-Source: ABdhPJx6CdavDVfWu6bIxh1PzNncMUt0tyw3jDSsZ6rvMr5NUFGRXWweD1aGZNxUAH1An1M1kP/1ag== X-Received: by 2002:a17:903:2287:b0:149:fa57:ea87 with SMTP id b7-20020a170903228700b00149fa57ea87mr15391807plh.94.1643046515847; Mon, 24 Jan 2022 09:48:35 -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.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:35 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Maxime Coquelin , Chenbo Xia Subject: [PATCH v2 68/83] net/virtio: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:47:04 -0800 Message-Id: <20220124174719.14417-69-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/virtio/virtio_user_ethdev.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 0271098f0da0..f6288fd0c492 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -688,14 +688,10 @@ virtio_user_pmd_probe(struct rte_vdev_device *vdev) ret = 0; end: - if (kvlist) - rte_kvargs_free(kvlist); - if (path) - free(path); - if (mac_addr) - free(mac_addr); - if (ifname) - free(ifname); + rte_kvargs_free(kvlist); + free(path); + free(mac_addr); + free(ifname); return ret; } -- 2.30.2