mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Davis <afd@ti.com>
To: Johan Hovold <johan@kernel.org>, Nishanth Menon <nm@ti.com>,
	"Santosh Shilimkar" <ssantosh@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>
Subject: Re: [PATCH] soc: ti: k3-socinfo: fix regmap leak on probe failure
Date: Mon, 1 Dec 2025 12:02:33 -0600	[thread overview]
Message-ID: <f8859e4e-b1e0-40ac-9e9b-dd30ab9d6d0b@ti.com> (raw)
In-Reply-To: <20251127134942.2121-1-johan@kernel.org>

On 11/27/25 7:49 AM, Johan Hovold wrote:
> The mmio regmap allocated during probe is never freed.
> 
> Switch to using the device managed allocator so that the regmap is
> released on probe failures (e.g. probe deferral) and on driver unbind.
> 
> Fixes: a5caf03188e4 ("soc: ti: k3-socinfo: Do not use syscon helper to build regmap")
> Cc: stable@vger.kernel.org	# 6.15
> Cc: Andrew Davis <afd@ti.com>
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---

Acked-by: Andrew Davis <afd@ti.com>

>   drivers/soc/ti/k3-socinfo.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/ti/k3-socinfo.c b/drivers/soc/ti/k3-socinfo.c
> index 50c170a995f9..42275cb5ba1c 100644
> --- a/drivers/soc/ti/k3-socinfo.c
> +++ b/drivers/soc/ti/k3-socinfo.c
> @@ -141,7 +141,7 @@ static int k3_chipinfo_probe(struct platform_device *pdev)
>   	if (IS_ERR(base))
>   		return PTR_ERR(base);
>   
> -	regmap = regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg);
> +	regmap = devm_regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg);
>   	if (IS_ERR(regmap))
>   		return PTR_ERR(regmap);
>   


  reply	other threads:[~2025-12-01 18:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-27 13:49 Johan Hovold
2025-12-01 18:02 ` Andrew Davis [this message]
2026-01-14 11:04 ` Johan Hovold
2026-01-14 17:10 ` Nishanth Menon

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=f8859e4e-b1e0-40ac-9e9b-dd30ab9d6d0b@ti.com \
    --to=afd@ti.com \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=ssantosh@kernel.org \
    --cc=stable@vger.kernel.org \
    /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®