Skip to content

Commit 37e0024

Browse files
Uwe Kleine-Königmiquelraynal
authored andcommitted
mtd: rawnand: omap2: Suppress error message after WARN in .remove()
Returning an error value in a platform remove callback results in an error message being emitted by the platform core, but otherwise it doesn't make a difference. After the WARN splat this generic error message doesn't add any value, so return 0 unconditionally Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20220603210758.148493-10-u.kleine-koenig@pengutronix.de
1 parent 279d719 commit 37e0024

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/mtd/nand/raw/omap2.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2278,16 +2278,14 @@ static int omap_nand_remove(struct platform_device *pdev)
22782278
struct mtd_info *mtd = platform_get_drvdata(pdev);
22792279
struct nand_chip *nand_chip = mtd_to_nand(mtd);
22802280
struct omap_nand_info *info = mtd_to_omap(mtd);
2281-
int ret;
22822281

22832282
rawnand_sw_bch_cleanup(nand_chip);
22842283

22852284
if (info->dma)
22862285
dma_release_channel(info->dma);
2287-
ret = mtd_device_unregister(mtd);
2288-
WARN_ON(ret);
2286+
WARN_ON(mtd_device_unregister(mtd));
22892287
nand_cleanup(nand_chip);
2290-
return ret;
2288+
return 0;
22912289
}
22922290

22932291
/* omap_nand_ids defined in linux/platform_data/mtd-nand-omap2.h */

0 commit comments

Comments
 (0)