[PATCH 05/46] mtd: Don't print a scary message when trying to remove a busy MTD

From: Daniel Walter
Date: Wed Aug 31 2016 - 03:38:47 EST


From: Richard Weinberger <richard@xxxxxx>

Just return -EBUSY and everything is fine.

Signed-off-by: Richard Weinberger <richard@xxxxxx>
---
drivers/mtd/mtdcore.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index b8205ec..32f1088 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -500,8 +500,6 @@ int del_mtd_device(struct mtd_info *mtd)
}

if (mtd->usecount) {
- printk(KERN_NOTICE "Removing MTD device #%d (%s) with use count %d\n",
- mtd->index, mtd->name, mtd->usecount);
ret = -EBUSY;
} else {
/* No need to get a refcount on the module containing
--
2.8.3