From: Miquel Raynal <miquel.raynal@bootlin.com>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Jens Axboe <axboe@kernel.dk>, Jan Kara <jack@suse.cz>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Edward Adam Davis <eadavis@qq.com>
Subject: Re: [PATCH v2] mtd: leave the device type unset when naming fails
Date: Fri, 04 Dec 2026 22:36:55 +0100 [thread overview]
Message-ID: <874ics683s.fsf@bootlin.com> (raw)
In-Reply-To: <20261108-submit-mtd-devname-retry-v1-v2-1-09f576bcc51f@gmail.com> (James Hilliard's message of "Sun, 08 Nov 2026 15:48:48 -0700")
On 08/11/2026 at 15:48:48 -07, James Hilliard <james.hilliard1@gmail.com> wrote:
> add_mtd_device() uses dev.type to reject a second registration of the
> same MTD. It sets that field before dev_set_name(), but the failure path
> for the name allocation leaves it set even though no device was
> registered. Retrying registration then warns and fails with -EEXIST.
>
> Set the type only after naming succeeds. The later registration error
> paths already clear it before releasing the device.
>
> Fixes: 6697dae1e2da ("mtd: capture device name setting failure when adding mtd")
> Cc: stable@vger.kernel.org
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
No longer applies, please rebase.
prev parent reply other threads:[~2026-12-04 21:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 22:48 [PATCH v2] mtd: leave the device type unset when naming fails James Hilliard
2026-12-04 21:36 ` 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=874ics683s.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=axboe@kernel.dk \
--cc=eadavis@qq.com \
--cc=jack@suse.cz \
--cc=james.hilliard1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=stable@vger.kernel.org \
--cc=vigneshr@ti.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