summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices
diff options
context:
space:
mode:
authorTed Juan <ted.juan@gmail.com>2014-06-20 17:32:05 +0800
committerBrian Norris <computersforpeace@gmail.com>2014-07-05 15:44:42 -0700
commit6938ad40cb97a52d88a763008935340729a4acc7 (patch)
tree922998d2715e8f70532010748ed7a3370693b860 /drivers/mtd/devices
parent7171511eaec5bf23fb06078f59784a3a0626b38f (diff)
downloadop-kernel-dev-6938ad40cb97a52d88a763008935340729a4acc7.zip
op-kernel-dev-6938ad40cb97a52d88a763008935340729a4acc7.tar.gz
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@gmail.com> Acked-by: Pekon Gupta <pekon@ti.com> Cc: <stable@vger.kernel.org> # 3.12.x+ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r--drivers/mtd/devices/elm.c2
1 files changed, 2 insertions, 0 deletions
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;
}
OpenPOWER on IntegriCloud