From patchwork Fri Oct 23 20:02:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: MTD: add missing put_chip() in cfi_intelext_reset() From: Nicolas Pitre X-Patchwork-Id: 36824 Message-Id: To: Antonio Ospite Cc: openezx-devel@lists.openezx.org, linux-mtd@lists.infradead.org Date: Fri, 23 Oct 2009 16:02:42 -0400 (EDT) Signed-off-by: Nicolas Pitre --- 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); }