public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Henry Martin <bsdhenrymartin@gmail.com>, djakov@kernel.org
Cc: s.nawrocki@samsung.com, a.swigon@samsung.com,
	alim.akhtar@samsung.com, linux-pm@vger.kernel.org,
	linux-samsung-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] interconnect: Add NULL check in exynos_generic_icc_probe
Date: Mon, 31 Mar 2025 13:34:02 +0200	[thread overview]
Message-ID: <2a3754ac-a4f2-4074-bb3e-18c973e04da2@kernel.org> (raw)
In-Reply-To: <20250331110802.9658-1-bsdhenrymartin@gmail.com>

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

      parent reply	other threads:[~2025-03-31 11:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-31 11:08 [PATCH] interconnect: Add NULL check in exynos_generic_icc_probe Henry Martin
2025-03-31 11:32 ` Krzysztof Kozlowski
2025-03-31 11:34 ` Krzysztof Kozlowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a3754ac-a4f2-4074-bb3e-18c973e04da2@kernel.org \
    --to=krzk@kernel.org \
    --cc=a.swigon@samsung.com \
    --cc=alim.akhtar@samsung.com \
    --cc=bsdhenrymartin@gmail.com \
    --cc=djakov@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=s.nawrocki@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox