mtd: devices: elm: fix elm_context_save() and elm_context_restore() functions
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Sat Jul 5 15:59:01 PDT 2014
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=6938ad40cb97a52d88a763008935340729a4acc7
Commit: 6938ad40cb97a52d88a763008935340729a4acc7
Parent: 7171511eaec5bf23fb06078f59784a3a0626b38f
Author: Ted Juan <ted.juan at gmail.com>
AuthorDate: Fri Jun 20 17:32:05 2014 +0800
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Sat Jul 5 15:44:42 2014 -0700
mtd: devices: elm: fix elm_context_save() and elm_context_restore() functions
These two function's switch case lack the 'break' that make them always
return error.
Signed-off-by: Ted Juan <ted.juan at gmail.com>
Acked-by: Pekon Gupta <pekon at ti.com>
Cc: <stable at vger.kernel.org> # 3.12.x+
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/devices/elm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c
index 7df8694..b4f61c7 100644
--- a/drivers/mtd/devices/elm.c
+++ b/drivers/mtd/devices/elm.c
@@ -475,6 +475,7 @@ static int elm_context_save(struct elm_info *info)
ELM_SYNDROME_FRAGMENT_1 + offset);
regs->elm_syndrome_fragment_0[i] = elm_read_reg(info,
ELM_SYNDROME_FRAGMENT_0 + offset);
+ break;
default:
return -EINVAL;
}
@@ -520,6 +521,7 @@ static int elm_context_restore(struct elm_info *info)
regs->elm_syndrome_fragment_1[i]);
elm_write_reg(info, ELM_SYNDROME_FRAGMENT_0 + offset,
regs->elm_syndrome_fragment_0[i]);
+ break;
default:
return -EINVAL;
}
More information about the linux-mtd-cvs
mailing list