From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19599C14C for ; Sat, 10 Jun 2023 01:43:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0BE1C43443; Sat, 10 Jun 2023 01:43:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686361402; bh=eI4zq24/7AMG6A6328sOGb83vfkqC3nEDDV4ul9VODY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b2xOE7C/fX4d3cx3/zYupXPkqEGF/R9ts8YhF00hx3Vh1DQdP0hfLGJK3qxzb/WOb 76qBPeCfKdzRntj/Fx4fCpdfyOhi2+dnqkntoGwhpXLT/A1dnIe1tKWQsNynpIHKAl 5ZCk3gpgxgYWD9awWQLbkI8aRCExEp3i4+fHStJ385+22Qa+16wEbeUEEbURSV4tPf GcpcIBLktuT/gMddPWSHkePRJJFsRUsKwxs344skVZuz/hSvK6ADn6LvxCd0tRTIYI KGF90DbT7+WoS2Bjz/03WqX+wXPnxS96kfJTP5vzpEfnmANXoDczuW5Y7cuAnEFhuR 8mcUZpuY5oJRQ== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet Cc: Saeed Mahameed , netdev@vger.kernel.org, Tariq Toukan , Christophe JAILLET , Simon Horman Subject: [net-next 15/15] net/mlx5e: Remove a useless function call Date: Fri, 9 Jun 2023 18:42:54 -0700 Message-Id: <20230610014254.343576-16-saeed@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230610014254.343576-1-saeed@kernel.org> References: <20230610014254.343576-1-saeed@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Christophe JAILLET 'handle' is known to be NULL here. There is no need to kfree() it. Signed-off-by: Christophe JAILLET Reviewed-by: Simon Horman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c index 0290e0dea539..4e923a2874ae 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c @@ -112,10 +112,8 @@ mlx5e_tc_post_act_add(struct mlx5e_post_act *post_act, struct mlx5_flow_attr *po int err; handle = kzalloc(sizeof(*handle), GFP_KERNEL); - if (!handle) { - kfree(handle); + if (!handle) return ERR_PTR(-ENOMEM); - } post_attr->chain = 0; post_attr->prio = 0; -- 2.40.1