Linux IEEE 802.15.4 and 6LoWPAN development
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Wentao Liang <vulab@iscas.ac.cn>
Cc: Alexander Aring <alex.aring@gmail.com>,
	 Stefan Schmidt <stefan@datenfreihafen.org>,
	 Andrew Lunn <andrew+netdev@lunn.ch>,
	 "David S. Miller" <davem@davemloft.net>,
	 Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>,
	linux-wpan@vger.kernel.org,  netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,  stable@vger.kernel.org
Subject: Re: [PATCH] ieee802154: fakelb: release platform device if driver registration fails
Date: Mon, 16 Nov 2026 15:59:17 +0100	[thread overview]
Message-ID: <87qzgkrfei.fsf@bootlin.com> (raw)
In-Reply-To: <20261103102854.1340581-1-vulab@iscas.ac.cn> (Wentao Liang's message of "Tue, 3 Nov 2026 10:28:54 +0000")

On 03/11/2026 at 10:28:54 GMT, Wentao Liang <vulab@iscas.ac.cn> wrote:

> fakelb_init_module() registers a platform device and then registers the
> platform driver, returning the result of the latter directly. If driver
> registration fails, module initialization fails and the module exit
> function is never run, so the platform device is never unregistered and
> leaks.
>
> Check the result of platform_driver_register() and unregister the device
> on failure. Also check the device registration result, which can be an
> ERR_PTR, before using the stored pointer.
>
> Fixes: e1e49b641387 ("drivers/ieee802154: IEEE 802.15.4 loopback driver")
> Cc: stable@vger.kernel.org
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>

I don't think it is super useful, but it's not wrong either.

Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>

      parent reply	other threads:[~2026-11-16 14:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 10:28 [PATCH] ieee802154: fakelb: release platform device if driver registration fails Wentao Liang
2026-11-03 10:33 ` netdev-bot+sinfo
2026-11-16 14:59 ` Miquel Raynal [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=87qzgkrfei.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=alex.aring@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=stefan@datenfreihafen.org \
    --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