Commit 37e00244 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Miquel Raynal

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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220603210758.148493-10-u.kleine-koenig@pengutronix.de
parent 279d719b
...@@ -2278,16 +2278,14 @@ static int omap_nand_remove(struct platform_device *pdev) ...@@ -2278,16 +2278,14 @@ static int omap_nand_remove(struct platform_device *pdev)
struct mtd_info *mtd = platform_get_drvdata(pdev); struct mtd_info *mtd = platform_get_drvdata(pdev);
struct nand_chip *nand_chip = mtd_to_nand(mtd); struct nand_chip *nand_chip = mtd_to_nand(mtd);
struct omap_nand_info *info = mtd_to_omap(mtd); struct omap_nand_info *info = mtd_to_omap(mtd);
int ret;
rawnand_sw_bch_cleanup(nand_chip); rawnand_sw_bch_cleanup(nand_chip);
if (info->dma) if (info->dma)
dma_release_channel(info->dma); dma_release_channel(info->dma);
ret = mtd_device_unregister(mtd); WARN_ON(mtd_device_unregister(mtd));
WARN_ON(ret);
nand_cleanup(nand_chip); nand_cleanup(nand_chip);
return ret; return 0;
} }
/* omap_nand_ids defined in linux/platform_data/mtd-nand-omap2.h */ /* omap_nand_ids defined in linux/platform_data/mtd-nand-omap2.h */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment