public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Herve Codina <herve.codina@bootlin.com>
To: Haotian Zhang <vulab@iscas.ac.cn>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] net: wan: framer: pef2256: Switch to devm_mfd_add_devices()
Date: Wed, 5 Nov 2025 08:34:08 +0100	[thread overview]
Message-ID: <20251105083408.71b8b6ee@bootlin.com> (raw)
In-Reply-To: <20251105034716.662-1-vulab@iscas.ac.cn>

Hi Haotian,

On Wed,  5 Nov 2025 11:47:16 +0800
Haotian Zhang <vulab@iscas.ac.cn> wrote:

> The driver calls mfd_add_devices() but fails to call mfd_remove_devices()
> in error paths after successful MFD device registration and in the remove
> function. This leads to resource leaks where MFD child devices are not
> properly unregistered.
> 
> Replace mfd_add_devices with devm_mfd_add_devices to automatically
> manage the device resources.
> 
> Fixes: c96e976d9a05 ("net: wan: framer: Add support for the Lantiq PEF2256 framer")
> Suggested-by: Herve Codina <herve.codina@bootlin.com>
> Suggested-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>

Not sure that 'Suggested-by: Jakub Kicinski' was needed according to his
comments on v2. Also, you forgot my 'Acked-by' I sent on v2.

Anyway, the v3 is ok on my side

Acked-by: Herve Codina <herve.codina@bootlin.com>

Best regards,
Hervé

  reply	other threads:[~2025-11-05  7:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-03 11:18 [PATCH] net: wan: framer: pef2256: Fix missing mfd_remove_devices() call Haotian Zhang
2025-11-03 11:43 ` Herve Codina
2025-11-03 12:37 ` [PATCH v2] net: wan: framer: pef2256: Switch to devm_mfd_add_devices() Haotian Zhang
2025-11-03 12:39   ` Herve Codina
2025-11-05  1:49   ` Jakub Kicinski
2025-11-05  3:47 ` [PATCH v3] " Haotian Zhang
2025-11-05  7:34   ` Herve Codina [this message]
2025-11-06  2:10   ` patchwork-bot+netdevbpf

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=20251105083408.71b8b6ee@bootlin.com \
    --to=herve.codina@bootlin.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vulab@iscas.ac.cn \
    /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