]> git.hungrycats.org Git - linux/commit
mtd: maps: vmu-flash: fix NULL pointer dereference in initialization
authorFlorian Fuchs <fuchsfl@gmail.com>
Mon, 18 May 2026 11:45:21 +0000 (13:45 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 27 May 2026 09:08:00 +0000 (11:08 +0200)
commit357e3b8e3a8769ba36eb8ec5e053e4825f1a9329
tree5c61a307331ff267e5e08e3561dbc6b39b3c8668
parent79d1661502c6e4b6f626185cef72cf2fa78116e1
mtd: maps: vmu-flash: fix NULL pointer dereference in initialization

The mtd_info contains a struct device, which must be linked to its
parent. Without this, the initialization of the MTD fails with a NULL
pointer dereference.

Fixes: 47a72688fae7 ("mtd: flash mapping support for Dreamcast VMU.")
Cc: stable@vger.kernel.org
Signed-off-by: Florian Fuchs <fuchsfl@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/maps/vmu-flash.c