projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba75321
)
[MTD] m25p80.c mutex unlock fix
author
Chen Gong
<g.chen@freescale.com>
Thu, 5 Jun 2008 13:50:04 +0000
(21:50 +0800)
committer
David Woodhouse
<dwmw2@infradead.org>
Fri, 6 Jun 2008 09:36:21 +0000
(10:36 +0100)
fix a mutex release bug in function m25p80_write.
Signed-off-by: Chen Gong <g.chen@freescale.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/devices/m25p80.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/mtd/devices/m25p80.c
b/drivers/mtd/devices/m25p80.c
index 25efd331ef28ce35b4a48f0463f594e221d94aa7..b402269301f6f64e4d22108ffc148f8220108b03 100644
(file)
--- a/
drivers/mtd/devices/m25p80.c
+++ b/
drivers/mtd/devices/m25p80.c
@@
-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);