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 04961A04A6; Mon, 24 Jan 2022 01:06:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DB525427EC; Mon, 24 Jan 2022 01:05:34 +0100 (CET) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mails.dpdk.org (Postfix) with ESMTP id CE2E1427B9 for ; Mon, 24 Jan 2022 01:05:31 +0100 (CET) Received: by mail-pg1-f172.google.com with SMTP id e16so4333330pgn.4 for ; Sun, 23 Jan 2022 16:05:31 -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=AKvZb0jmjUHFdNWvNQO2+9sswUBriBoXY4swBNrp1IM=; b=ofbUeNgETO6k/iF7S5IrupUNU73QUeu56FKYT/Jv1DQTSGNjyr/h5px6elKEplMdoi ryEBUjhXl1VlnclxXbVqPzfLluUKeeZ5GdDNq5t7vqZXvCbDu8W11DSSckG75oTKj3pF 66QSwfNH8QtArSlUXBXxKssEhVdWSPRaenl1M6kMjz/cOLGq+FNys7+MPSIA8GQGWR4j anAi7rpIWHeTSxi2EO3zmjag9uhufNBv4d+FRqH9t7PX1JfQbbUY6KXl26ABgwoGaHV9 bSCJHQyrMHC+s9dIE62WQNZ+Smm9DFWP7qJkrY0oFzsNBacdvFyNFQUxfeXlf81MHk9d BQ9A== 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=AKvZb0jmjUHFdNWvNQO2+9sswUBriBoXY4swBNrp1IM=; b=dqa5WV31Ko+/WKPyY7jtlIOUnyhWc8UJO2Xm3Y5WTL5gXc26nV4kEl0XI+qPagFnHj mT/8QQLGZMm8fnzxOl6WfH8RRq8wtKXKGfdxu/UEGmYOa6i/HjF1ihRfL4RJPl3c/Exy yx6LzmMowHX83BJztYqGo2OGaRpAVZBVAhP7vbWZWBn5wsc7FGbhNBbJi2rIlXrwteTq egMkhlmmUXy4n6/Q2rL7P4fA9FXqsAw0Q5UJPD2FfIMVRYZryw/bbNNzedZ8/eKCO9qT FZi0nluieviHdL2szYXnrEmjqayNv/aycuznU52RmbEi3IkssemTD+FXjEo1UEYCW/YO pF1Q== X-Gm-Message-State: AOAM533iXXXAepYFtyQFsJ3mPonkXWe34dmEls91KH/7FQq2EBaIQD3V Vc29ph1uEvgEm4M399a0RKRBtqhn/xjCKw== X-Google-Smtp-Source: ABdhPJzY6IrGnMAh7gQXKBckXtxMl7XiWlTHfX8yuJK9d3+k+FFtPQeEFx38SfokjFmDjBhisNSxtA== X-Received: by 2002:aa7:84cf:0:b0:4c8:7234:e6ca with SMTP id x15-20020aa784cf000000b004c87234e6camr5290955pfn.35.1642982730844; Sun, 23 Jan 2022 16:05:30 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:05:30 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Maxime Coquelin , Chenbo Xia Subject: [PATCH 09/82] examples/vhost_blk: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:05 -0800 Message-Id: <20220124000518.319850-10-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 --- examples/vhost_blk/vhost_blk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c index feadacc62ee5..2cab1e6994fe 100644 --- a/examples/vhost_blk/vhost_blk.c +++ b/examples/vhost_blk/vhost_blk.c @@ -849,8 +849,7 @@ static void vhost_blk_ctrlr_destroy(struct vhost_blk_ctrlr *ctrlr) { if (ctrlr->bdev != NULL) { - if (ctrlr->bdev->data != NULL) - rte_free(ctrlr->bdev->data); + rte_free(ctrlr->bdev->data); rte_free(ctrlr->bdev); } -- 2.30.2