Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd/rfd_ftl: don't cast away the type when calling add_mtd_blktrans_dev

Pass the actual mtd_blktrans_dev instead of casting the containing
structure to void *.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210823073359.705281-5-hch@lst.de

authored by

Christoph Hellwig and committed by
Miquel Raynal
a0faf5fd ffd18c97

+1 -1
+1 -1
drivers/mtd/rfd_ftl.c
··· 783 783 printk(KERN_INFO PREFIX "name: '%s' type: %d flags %x\n", 784 784 mtd->name, mtd->type, mtd->flags); 785 785 786 - if (!add_mtd_blktrans_dev((void*)part)) 786 + if (!add_mtd_blktrans_dev(&part->mbd)) 787 787 return; 788 788 } 789 789 out: