mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
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: 47a72688fa ("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>
This commit is contained in:
parent
79d1661502
commit
357e3b8e3a
|
|
@ -547,6 +547,7 @@ static void vmu_queryblocks(struct mapleq *mq)
|
|||
mpart->partition = card->partition;
|
||||
mtd_cur->priv = mpart;
|
||||
mtd_cur->owner = THIS_MODULE;
|
||||
mtd_cur->dev.parent = &mdev->dev;
|
||||
|
||||
pcache = kzalloc_obj(struct vmu_cache);
|
||||
if (!pcache)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user