diff options
author | Ted Juan <ted.juan@gmail.com> | 2014-06-20 17:32:05 +0800 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-07-29 17:01:45 +0200 |
commit | b2a13535522c598f332f182dcacab0557ea44b0e (patch) | |
tree | f58c336c36575c344a5beeeb1b41fbfba85139f0 | |
parent | bde32a05cc099e4ba4a117afb678134dd7082e82 (diff) |
mtd: devices: elm: fix elm_context_save() and elm_context_restore() functions
commit 6938ad40cb97a52d88a763008935340729a4acc7 upstream.
These two function's switch case lack the 'break' that make them always
return error.
Signed-off-by: Ted Juan <ted.juan@gmail.com>
Acked-by: Pekon Gupta <pekon@ti.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
-rw-r--r-- | drivers/mtd/devices/elm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c index d1dd6a33a05..3059a7a53bf 100644 --- a/drivers/mtd/devices/elm.c +++ b/drivers/mtd/devices/elm.c @@ -428,6 +428,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; } @@ -466,6 +467,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; } |