From: Krzysztof Kozlowski <krzk@kernel.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
lee@kernel.org, alim.akhtar@samsung.com, s.nawrocki@samsung.com,
beomho.seo@samsung.com, ideal.song@samsung.com
Cc: linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 4/4] mfd: exynos-lpass: Fix another error handling path in exynos_lpass_probe()
Date: Sun, 30 Mar 2025 12:03:50 +0200 [thread overview]
Message-ID: <2724ab2e-2ce0-4240-bbb7-804efd031dd7@kernel.org> (raw)
In-Reply-To: <d224865a16b50498279b044a819e1e187d01bb28.1743231856.git.christophe.jaillet@wanadoo.fr>
On 29/03/2025 08:45, Christophe JAILLET wrote:
> lpass = devm_kzalloc(dev, sizeof(*lpass), GFP_KERNEL);
> if (!lpass)
> @@ -143,7 +144,15 @@ static int exynos_lpass_probe(struct platform_device *pdev)
> pm_runtime_enable(dev);
> exynos_lpass_enable(lpass);
>
> - return devm_of_platform_populate(dev);
> + ret = devm_of_platform_populate(dev);
> + if (ret)
> + goto err_remove_exynos_lpass;
> +
> + return 0;
> +
> +err_remove_exynos_lpass:
> + exynos_lpass_remove(pdev);
You should have here standard unwinding, not calling remove. Or better
just convert everything to devm, because mixing devm and non-devm is
error prone.
Best regards,
Krzysztof
prev parent reply other threads:[~2025-03-30 10:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-29 7:45 [PATCH 0/4] mfd: exynos-lpass: Fix some error handling paths Christophe JAILLET
2025-03-29 7:45 ` [PATCH 1/4] mfd: exynos-lpass: Fix an error handling path in exynos_lpass_probe() Christophe JAILLET
2025-03-30 10:01 ` Krzysztof Kozlowski
2025-03-29 7:45 ` [PATCH 2/4] mfd: exynos-lpass: Avoid calling exynos_lpass_disable() twice in exynos_lpass_remove() Christophe JAILLET
2025-03-30 10:02 ` Krzysztof Kozlowski
2025-03-29 7:45 ` [PATCH 3/4] mfd: exynos-lpass: Move exynos_lpass_remove() Christophe JAILLET
2025-03-30 10:02 ` Krzysztof Kozlowski
2025-03-29 7:45 ` [PATCH 4/4] mfd: exynos-lpass: Fix another error handling path in exynos_lpass_probe() Christophe JAILLET
2025-03-30 10:03 ` 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=2724ab2e-2ce0-4240-bbb7-804efd031dd7@kernel.org \
--to=krzk@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=beomho.seo@samsung.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=ideal.song@samsung.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®