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 7734DA04AD; Mon, 24 Jan 2022 18:53:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E60B4429A4; Mon, 24 Jan 2022 18:48:44 +0100 (CET) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mails.dpdk.org (Postfix) with ESMTP id A6FB542995 for ; Mon, 24 Jan 2022 18:48:41 +0100 (CET) Received: by mail-pf1-f173.google.com with SMTP id a8so11337680pfa.6 for ; Mon, 24 Jan 2022 09:48:41 -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=03M1MWvWwhaB58zM0RugVldTl0wx6UK9otpxRcdPWnA=; b=BDT/84OvAVrArJMWgTla8iyhwPTHRF+El2iqUAr3+3wOGLaJ+WoImd9pBsMAYRvBiQ 7lpMiZySIzkDLF7dumpesDfaROvcLEHsWkc/+3AuobSkSCLg4X5nL+2NOZT7VhEx9QAo hBv1fW2H+bhBQadRAfEmY2vYFRLN+41uXDon0gnJ8i7RJFNUGTrS7bYbFzlEmFJJFean PFoh/Fxmd/buSrp6kOKu4AvWWr/2/j2UlQc7STrTyvkGvH5kCJWw7E/nBOhhLOLQwf8s sIZKFT/7pR0+9PIfNfKR+9rce1RJ2inLWFBDv8hphNjPc56lDbjpT24Qhu25OnTJPEB/ /s6A== 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=03M1MWvWwhaB58zM0RugVldTl0wx6UK9otpxRcdPWnA=; b=4Ct98m1YuUQW10uXlUB86IVRz641uHefSKDspiMotNO30qR/jy/qcV/hydHZriS1AL C85KqQcSRxuoQpZBtR+YeWBMJbTPj8ypOhcuhi1woz6d0ZVCvZmwzvh3+nc7RY6nWO5Z p5AIHlkV0dfvUmWYK1vo3xRGxZwtGqYx5IqYR9OBiKLV5xwQU/4pqSDHSCy8HNUk0kVB OLghzOMHXKJexqpirTYxbf/SPiL/aYrtVHU733YExsCS2H37SUAbYHDHeTsxlx6WTLeM f3Qoy3Um2fhKYPHu0+oiLOyogh9vd3lwPOmSxeLQjKLaWpviZve3dvsY8lMxnK5Ni2A/ wgqQ== X-Gm-Message-State: AOAM53206jkWnFbapetf39hDT59UiCb19+WXHKkt2FAkhV+cfyuRUtsl I3dD9vERJwgqHel9TUU0CshSwSw5eS88lw== X-Google-Smtp-Source: ABdhPJyUC9p+7EswA5f1MxZCaMIk+1TalcIF9wiNeWNgX2bB3FCofP4TOr7+md+hXv5Y0R4DNtg/nQ== X-Received: by 2002:a65:6a97:: with SMTP id q23mr12817163pgu.464.1643046520657; Mon, 24 Jan 2022 09:48:40 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:40 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Hemant Agrawal , Nipun Gupta Subject: [PATCH v2 72/83] raw/skeleton: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:47:08 -0800 Message-Id: <20220124174719.14417-73-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 Acked-by: Hemant Agrawal --- drivers/raw/skeleton/skeleton_rawdev_test.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c b/drivers/raw/skeleton/skeleton_rawdev_test.c index 484468eeb460..693b24c415de 100644 --- a/drivers/raw/skeleton/skeleton_rawdev_test.c +++ b/drivers/raw/skeleton/skeleton_rawdev_test.c @@ -395,13 +395,11 @@ test_rawdev_enqdeq(void) RTE_TEST_ASSERT_EQUAL((unsigned int)ret, count, "Unable to dequeue buffers"); - if (deq_buffers) - free(deq_buffers); + free(deq_buffers); return TEST_SUCCESS; cleanup: - if (buffers[0].buf_addr) - free(buffers[0].buf_addr); + free(buffers[0].buf_addr); return TEST_FAILED; } -- 2.30.2