Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc018863 authored by Chen Gong's avatar Chen Gong Committed by David Woodhouse
Browse files

[MTD] m25p80.c mutex unlock fix



fix a mutex release bug in function m25p80_write.

Signed-off-by: default avatarChen Gong <g.chen@freescale.com>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent ba753211
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -346,8 +346,10 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len,
	mutex_lock(&flash->lock);

	/* Wait until finished previous write command. */
	if (wait_till_ready(flash))
	if (wait_till_ready(flash)) {
		mutex_unlock(&flash->lock);
		return 1;
	}

	write_enable(flash);