提交 9650b9be 编写于 作者: B Brian Norris

mtd: m25p80: fixup device removal failure path

Device removal should fail if MTD unregistration fails.
Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
Reviewed-by: NMarek Vasut <marex@denx.de>
上级 d367e37e
......@@ -1125,9 +1125,7 @@ static int m25p_remove(struct spi_device *spi)
struct m25p *flash = spi_get_drvdata(spi);
/* Clean up MTD stuff. */
mtd_device_unregister(&flash->mtd);
return 0;
return mtd_device_unregister(&flash->mtd);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册