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 3B5E8A034E; Wed, 9 Feb 2022 20:21:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 134334273C; Wed, 9 Feb 2022 20:18:36 +0100 (CET) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mails.dpdk.org (Postfix) with ESMTP id 0F570411DD for ; Wed, 9 Feb 2022 20:18:35 +0100 (CET) Received: by mail-pj1-f43.google.com with SMTP id v5-20020a17090a4ec500b001b8b702df57so6082185pjl.2 for ; Wed, 09 Feb 2022 11:18:34 -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=17TGtkHnJlMThSKD+bfCch9W0LbUS95cRYK1gRUXfQo=; b=oOCvAZsq1DN8pEkYmp+7fNOEz93O4sk0cDxgZKpPtVQ8behVA7o2sBz/x5YKKjYQ3v b4KiuqRPSLXqUs3my+i7gg4Ur2Vpg5APFKgnFJ/zEU2UqA6IObuYKPng0vbONv7HOX11 UeFjez4Kufpg1RAzghgw7Q8wcxAGJnVLtkgQqoJTtMys1ZcoxPhjX0qLr2P+RtnfGDds BUMx0pu4jD79CBUPo8gHKxI3KnhPMZnUcq5YNCXPtnJGCZy4bG7gazUAw7ISdPbw4A9+ Rz9Eqj1sDnQhEk9NSJNWSr5Z3yqF5KqREOt9dyzlxIZtCh16Sv0dQLh5IlVjZBY/2T+9 GLqg== 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=17TGtkHnJlMThSKD+bfCch9W0LbUS95cRYK1gRUXfQo=; b=nSt3MNqe5Zj0DivwGeI9k5zvuniRe5v9v4DP3CeUHjd0XdFw+aZ4mGDFeaveLJFs/r zeRFfpdqWyh5334Evyi15WaxIkwPRQFkX0drxLgJ/pqlRKdIETJ/qZR/LsnmJJCA5Tn9 wK17UPu8z6TfPZGgO/g+p3B20mBLjC5JdiApB44u8Qygo3v+phrCJ4qXXCfcQmC7XWHS y6l3vsSV1qaZ99Xf0OaUw3OJVNQp5hoAVYTPKT5S+JHOEgeZdh0NROkTyx9YnAFBPZ5h aA3Sw3ZF5vd/WSMTduEo+1XsGX2W8newW8ABFr2nR+w6mh19vGchCWmJugVWGBLaczIa WJ+g== X-Gm-Message-State: AOAM531+2Npb8TiObWSFbZmcFRWfpUStvkz4rihTm53K6e+lo2+Q4trs Wo84A13acTK+tkMw9wr10txord4SaM9j5wjk2Xo= X-Google-Smtp-Source: ABdhPJzWSQIsaZUAUL6urrJ+QwrtYxyvwgza89VWX7sLHJppBTQeG164fqChJGlotl7GyZVciyCcVA== X-Received: by 2002:a17:90a:1de:: with SMTP id 30mr4214557pjd.177.1644434313672; Wed, 09 Feb 2022 11:18:33 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 11:18:33 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Fan Zhang , Ashish Gupta Subject: [PATCH v3 35/36] compressdev: remove unnecessary NULL checks Date: Wed, 9 Feb 2022 11:17:47 -0800 Message-Id: <20220209191748.377729-36-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 Acked-by: Fan Zhang --- lib/compressdev/rte_compressdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/compressdev/rte_compressdev.c b/lib/compressdev/rte_compressdev.c index 2e9218af68f6..d4f7d4d3daf2 100644 --- a/lib/compressdev/rte_compressdev.c +++ b/lib/compressdev/rte_compressdev.c @@ -405,8 +405,7 @@ rte_compressdev_queue_pairs_release(struct rte_compressdev *dev) return ret; } - if (dev->data->queue_pairs != NULL) - rte_free(dev->data->queue_pairs); + rte_free(dev->data->queue_pairs); dev->data->queue_pairs = NULL; dev->data->nb_queue_pairs = 0; -- 2.34.1