summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2022-06-03 23:07:53 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2022-06-09 15:06:21 +0200
commit37e00244047c5675a7f3f1ec0358f8c53cd12b75 (patch)
treefa7b58c7c1b9c8ee248b2759ac3d6e2673018226 /drivers/mtd
parentmtd: spear_smi: Drop if with an always false condition (diff)
downloadlinux-37e00244047c5675a7f3f1ec0358f8c53cd12b75.tar.xz
linux-37e00244047c5675a7f3f1ec0358f8c53cd12b75.zip
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
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/raw/omap2.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/nand/raw/omap2.c b/drivers/mtd/nand/raw/omap2.c
index 58c32a11792e..4a9f2b6c772d 100644
--- a/drivers/mtd/nand/raw/omap2.c
+++ b/drivers/mtd/nand/raw/omap2.c
@@ -2278,16 +2278,14 @@ static int omap_nand_remove(struct platform_device *pdev)
struct mtd_info *mtd = platform_get_drvdata(pdev);
struct nand_chip *nand_chip = mtd_to_nand(mtd);
struct omap_nand_info *info = mtd_to_omap(mtd);
- int ret;
rawnand_sw_bch_cleanup(nand_chip);
if (info->dma)
dma_release_channel(info->dma);
- ret = mtd_device_unregister(mtd);
- WARN_ON(ret);
+ WARN_ON(mtd_device_unregister(mtd));
nand_cleanup(nand_chip);
- return ret;
+ return 0;
}
/* omap_nand_ids defined in linux/platform_data/mtd-nand-omap2.h */