[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2a3754ac-a4f2-4074-bb3e-18c973e04da2@kernel.org>
Date: Mon, 31 Mar 2025 13:34:02 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Henry Martin <bsdhenrymartin@...il.com>, djakov@...nel.org
Cc: s.nawrocki@...sung.com, a.swigon@...sung.com, alim.akhtar@...sung.com,
linux-pm@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] interconnect: Add NULL check in exynos_generic_icc_probe
On 31/03/2025 13:08, Henry Martin wrote:
> ---
> drivers/interconnect/samsung/exynos.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/interconnect/samsung/exynos.c b/drivers/interconnect/samsung/exynos.c
> index 9e041365d909..3dccc84f72cf 100644
> --- a/drivers/interconnect/samsung/exynos.c
> +++ b/drivers/interconnect/samsung/exynos.c
> @@ -134,6 +134,8 @@ static int exynos_generic_icc_probe(struct platform_device *pdev)
> priv->node = icc_node;
> icc_node->name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%pOFn",
> bus_dev->of_node);
> + if (!icc_node->name)
> + return -ENOMEM;
Ah, and this also leaks ICC node.
Don't create such patches in automated way, but really analyze the
entire code. You just looked at other persons' commit and decided to do
the same, but this is not correct.
Best regards,
Krzysztof
Powered by blists - more mailing lists