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 79C8DA04AD; Mon, 24 Jan 2022 18:48:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 030DB4280B; Mon, 24 Jan 2022 18:47:37 +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 37DBC42802 for ; Mon, 24 Jan 2022 18:47:33 +0100 (CET) Received: by mail-pl1-f172.google.com with SMTP id d18so3622335plg.2 for ; Mon, 24 Jan 2022 09:47:33 -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=kz/thC+LSsYvtIA2/Gai0fkgn7U128bQRlk01kEcPDqErNAfVXIQVygcJ39zBB8p36 L0B2W/BbV1XaozX+obKZezIQA49zZKVhP+3ztIN6/4WKxh1f3vst8FZ64qqQuXHcvsbW pH33feZ+3fVg2PztSU0Yxk+P4QXpfO2vl2vwWJF6I4KhxqZtZNC2tbiaNJFIGCjatw51 2I3itOca9VDU1beoSrEWKsBKtZVAlzQEk1H3yQTOba1RgzxZ0fyhW1CL+XyLrdvwy/wx o01gTYw4eT+5237k7mYrKO6jpSdmn4by6LZV1PIn6W20lEoDHi1H1xq/WUVmz/Zp8B58 nfoA== 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=TpNdXCDb1b2J6qhgClo4M8JWfbZwmGGQ8LcGQ+8x+9B11b8+nCBhW+LKRJjW9O3zVW afPDHWtdnizljCOJakSdFGTAmxHp57xDmJNd0Man3t3mFi6Xd4puzlQjqlpQy6rl8+Iv 6Dd/sqCv5PH+2x8OP+4eE7pHMY/L1ZNkYwxcKQSbcEmHT8v5dU7NJadiKlsvPhYNE6Ln MCYXV3aOa69oMBvw04hluixOv4p0wiQaLGBz6Ab6J9kweTBRMisd5EWLVA32UzUTxGtB fmoDd7zYOG8Xa2kAz5j3VJ7Eav8XyleRPddSOq9YCMv8+4AA6rycSmNBrpiXqBUOGtfG YYYA== X-Gm-Message-State: AOAM5322o1/YLuu+jSrfqUeyGreDb6UN4co6HgGxRgj76PgTTbA7aw7f SUoWG8kYKPfJDJ+FHgr/N2Le/HeOD+TvMg== X-Google-Smtp-Source: ABdhPJxNh+C/heB7bbKN0QbWEwf/HcjQjL1QWu/nGb3MKli+AXdEJY/mEIvnnqdfnNxmOjh3g+dXmQ== X-Received: by 2002:a17:90b:17c8:: with SMTP id me8mr2977412pjb.105.1643046452243; Mon, 24 Jan 2022 09:47:32 -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.47.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:47:31 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Maxime Coquelin , Chenbo Xia Subject: [PATCH v2 10/83] examples/vhost_blk: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:06 -0800 Message-Id: <20220124174719.14417-11-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 --- 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