Skip to content

Commit 5dcddeb

Browse files
Boris Brezillonmiquelraynal
authored andcommitted
mtd: rawnand: Kill cafe_nand_bug()
Leaving a function pointer to NULL should be enough to trigger a NULL pointer exception, and anyway, if we want to BUG() when some missing hooks are called, this should be done in the core, so let's drop the cafe_nand_bug() dummy function. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
1 parent a58d0b4 commit 5dcddeb

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

‎drivers/mtd/nand/raw/cafe_nand.c‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -345,11 +345,6 @@ static irqreturn_t cafe_nand_interrupt(int irq, void *id)
345345
return IRQ_HANDLED;
346346
}
347347

348-
static void cafe_nand_bug(struct mtd_info *mtd)
349-
{
350-
BUG();
351-
}
352-
353348
static int cafe_nand_write_oob(struct mtd_info *mtd,
354349
struct nand_chip *chip, int page)
355350
{
@@ -760,9 +755,6 @@ static int cafe_nand_probe(struct pci_dev *pdev,
760755
cafe->nand.ecc.size = mtd->writesize;
761756
cafe->nand.ecc.bytes = 14;
762757
cafe->nand.ecc.strength = 4;
763-
cafe->nand.ecc.hwctl = (void *)cafe_nand_bug;
764-
cafe->nand.ecc.calculate = (void *)cafe_nand_bug;
765-
cafe->nand.ecc.correct = (void *)cafe_nand_bug;
766758
cafe->nand.ecc.write_page = cafe_nand_write_page_lowlevel;
767759
cafe->nand.ecc.write_oob = cafe_nand_write_oob;
768760
cafe->nand.ecc.read_page = cafe_nand_read_page;

0 commit comments

Comments
 (0)