提交 1cc82e09 编写于 作者: U Uwe Kleine-König 提交者: Miquel Raynal

mtd: rawnand: atmel: Warn about failure to unregister mtd device

The Linux device core doesn't intend remove callbacks to fail. If an
error code is returned the device is removed anyhow. So wail loudly if
the atmel specific remove callback fails and return 0 anyhow to suppress
the generic (and little helpful) error message by the device core.

This is a preparation for making platform remove callbacks return void.
Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220607062503.211345-1-u.kleine-koenig@pengutronix.de
上级 f88c97c1
...@@ -2629,7 +2629,9 @@ static int atmel_nand_controller_remove(struct platform_device *pdev) ...@@ -2629,7 +2629,9 @@ static int atmel_nand_controller_remove(struct platform_device *pdev)
{ {
struct atmel_nand_controller *nc = platform_get_drvdata(pdev); struct atmel_nand_controller *nc = platform_get_drvdata(pdev);
return nc->caps->ops->remove(nc); WARN_ON(nc->caps->ops->remove(nc));
return 0;
} }
static __maybe_unused int atmel_nand_controller_resume(struct device *dev) static __maybe_unused int atmel_nand_controller_resume(struct device *dev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册