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 EF402A034E; Wed, 9 Feb 2022 20:21:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 720D342723; Wed, 9 Feb 2022 20:18:30 +0100 (CET) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id BAC7C42707 for ; Wed, 9 Feb 2022 20:18:28 +0100 (CET) Received: by mail-pl1-f174.google.com with SMTP id y17so3067387plg.7 for ; Wed, 09 Feb 2022 11:18:28 -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=/AVW12TQUgSC6YQ/FGMIYbXQui51LaIEVAplyK7AFPI=; b=BHYi5hyXWusRaa2DmlrFU5WoQ2cx2hTEUs1S6ZovRP913DTTxh4o1EFJ1kKu1Cmiqj +LafvHBMohoSBKVokf7ebLoYulgp6973Q0runzjJMuY1ECB8IJftS9tQ5z8Nnx20YCLv s4vUHhdFbY2qnidYn55WP6Bye15//54YIvWcB1VaAed0g8OWNdNGO8hf5gYJHGMQ7gXJ hKM2TnCjjwyHf/CZf+Ah9ZIUHH8xpR3SbVo8C4BxBEwi9eDzXaP1pNYgz6MQQuRpQc3f XwX87hPb5eX1QxgpeexvldD9iR7nm259t7qHRz4Bxor0d98ciP7f71ja7iwMDpMz0uPC f0MA== 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=/AVW12TQUgSC6YQ/FGMIYbXQui51LaIEVAplyK7AFPI=; b=GwxlspMFdReoK37fmz5xyvHS+H5Jcu/lftE2Gmc2uVRFYmToA5kgK25wQDrYufQLD2 tRHiy4MWG9/8bF/E0qEkw5WSCCdLpeSBkjyo6d1PxVJJxzs8qWby+emdgfHB7uetdQhb snl4/HVVjKu1QFflqXBjWPxCV9BbFTR2O5QSwLdB+5dam8qySajRGUJCcurP1lOMr/XX I5W3WBELrQj+1k6h7fJoDO+XzFVAojYgptbZj00Ly/t7z60vw2DvYBMrQ/GSZOfED7kP Op8cGD6aB9vlm177a8jrzNvoLywQW4W6SOfQzaaXXEVgkeR/NM143b/t3f/nzhIe/6u+ QOJA== X-Gm-Message-State: AOAM533exBaLcAwHOAqPDOw55SgL9vAAc3VFPtJRFm9LxI3cLM6wv0Pr 3P74dZzO1QPCnUu1LlPJRHUufa9IIYduYo7T5FY= X-Google-Smtp-Source: ABdhPJzOZtTrCEeo1OxKKP7+iCVRXBcHwmP02n8nnY2EJ28/XnrKvxfRJuGNIsVGOhh64b6pfu0YpQ== X-Received: by 2002:a17:902:ce86:: with SMTP id f6mr3454623plg.66.1644434307722; Wed, 09 Feb 2022 11:18:27 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id u16sm14378401pgh.54.2022.02.09.11.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 11:18:27 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Maxime Coquelin , Chenbo Xia Subject: [PATCH v3 30/36] net/virtio: remove unnecessary NULL checks Date: Wed, 9 Feb 2022 11:17:42 -0800 Message-Id: <20220209191748.377729-31-stephen@networkplumber.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209191748.377729-1-stephen@networkplumber.org> References: <20220124000518.319850-1-stephen@networkplumber.org> <20220209191748.377729-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 16eca2f94080..a7d7063c2a88 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -689,14 +689,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.34.1