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 6535E45C7A; Tue, 12 Nov 2024 18:38:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B2056402E2; Tue, 12 Nov 2024 18:38:46 +0100 (CET) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mails.dpdk.org (Postfix) with ESMTP id F323140144 for ; Tue, 12 Nov 2024 18:38:44 +0100 (CET) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-720c2db824eso6469624b3a.0 for ; Tue, 12 Nov 2024 09:38:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731433124; x=1732037924; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Jt6O2X/Vuh1qVsEysPBgDGutMBpYJ5IrEEzxO+yKHC8=; b=0tF45u4VE93vxjBJsVL45sMECgP7dRtszL6EfYQDzmYisgP/zrojEXGAeaFHmXv5EA 5UeRNg9eFWiiqfrGu01zmznP4ZyqXhRPZihADT9jwggGTuA1sDZxUQMICkYcaHntHTim EHNTEDSYe/ly/AFXcFrE9l2pHVaSFQEL7Non9g/AygBvJwf+AC9mRnQXkjL4a2x2TriE 9IiEAoS6t+1lAgeJjoJ7/c1SkqzrXgLFkeFh00BjRFFIHUG5I8i8E/Tszbv85VEAI3EF YVIMxawxRXTlGN4VOMMkcLZFnYEgfs4e/Kh3nMz3O8cw62GuT3pyzO1Cu/hj6wPZv5fp Qf+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731433124; x=1732037924; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Jt6O2X/Vuh1qVsEysPBgDGutMBpYJ5IrEEzxO+yKHC8=; b=G7yJ2qqRsdnY8+FC4dmoLTzqPzX6XjlWuUk2eq305/zhQYfcBOQmaS8YpXPdc8PknI VBiDu5AFs1UA1JhL6ktYMbUt+iMcDBSdMV3qf3KakpmzGeEvLukuE3qSalg+Vz4ovp3y /jHi6zLsPDE5gliw8LzBnk1tuuWyzxK6WkN6bJxUYG+Rdj73frVUCfqoDkPR7CKH26d7 18Qn/rbb2Hy6hp+p5U+YDM0HH78V6oplFB4QT37l80Cdufv6wgpjth30IGm2NqZnX63L zAYiBwHgHZJKkfL11jl60GvRoNQ4PoAwU5jaGpQxcJSk/I2MPuXPPunU1MBbuCjU+fmG Ab4g== X-Gm-Message-State: AOJu0YwNW+r2oCElM5gNjC4qNaxgkTBf0CW2yDQI8M/1PlPJuIIDHIW2 6CpEREicHWXq4YYdNGDKDBQSLy5b1q9r3SDR5RbvctAiZ3f2HFW5jxey6CZf1SQUgSYQncm8tgl hZqc= X-Google-Smtp-Source: AGHT+IHlKsllTTCLtkgCNYl06zTnj0wXMn5eVsCf74AiFsHMTI14eo16nNKmkpH41kxmhlkCHSoDTg== X-Received: by 2002:a05:6a00:4610:b0:71e:744a:3fbd with SMTP id d2e1a72fcca58-7241334f8b3mr23339804b3a.20.1731433124151; Tue, 12 Nov 2024 09:38:44 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-724078641a2sm11836727b3a.20.2024.11.12.09.38.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 09:38:43 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , jun.yang@nxp.com, Hemant Agrawal , Sachin Saxena Subject: [PATCH 1/3] bus/fslmc: remove unnecessary null check Date: Tue, 12 Nov 2024 09:38:01 -0800 Message-ID: <20241112173833.323934-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241112173833.323934-1-stephen@networkplumber.org> References: <20241112173833.323934-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 No need for check for null before calling free(). Caught by nullfree.cocci script. Fixes: 57cb02edf122 ("bus/fslmc: enhance MC VFIO multi-process support") Cc: jun.yang@nxp.com Signed-off-by: Stephen Hemminger --- drivers/bus/fslmc/fslmc_vfio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index c581dcc4e2..7a584b9280 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -557,8 +557,7 @@ fslmc_vfio_open_container_fd(void) return vfio_container_fd; err_exit: - if (mp_reply.msgs) - free(mp_reply.msgs); + free(mp_reply.msgs); DPAA2_BUS_ERR("Open container fd err(%d)", ret); return ret; } -- 2.45.2