[PATCH] MTD: add missing put_chip() in cfi_intelext_reset()

Nicolas Pitre nico at fluxnic.net
Fri Oct 23 16:02:42 EDT 2009


Signed-off-by: Nicolas Pitre <nico at fluxnic.net>

---

On Fri, 23 Oct 2009, Antonio Ospite wrote:

> Hi,
> 
> I am attaching a trace of a possible recursive locking in
> cfi_cmdset_0001.c

This patch should fix it.

diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index e7563a9..d923a2d 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -2564,6 +2564,7 @@ static int cfi_intelext_reset(struct mtd_info *mtd)
 		if (!ret) {
 			map_write(map, CMD(0xff), chip->start);
 			chip->state = FL_SHUTDOWN;
+			put_chip(map, chip, chip->start);
 		}
 		spin_unlock(chip->mutex);
 	}



More information about the linux-mtd mailing list