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

mtd/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-4-hch@lst.de

authored by

Christoph Hellwig and committed by
Miquel Raynal
ffd18c97 f214eebf

+1 -1
+1 -1
drivers/mtd/ftl.c
··· 1029 1029 1030 1030 partition->mbd.tr = tr; 1031 1031 partition->mbd.devnum = -1; 1032 - if (!add_mtd_blktrans_dev((void *)partition)) 1032 + if (!add_mtd_blktrans_dev(&partition->mbd)) 1033 1033 return; 1034 1034 } 1035 1035