From: Ted Juan Date: Fri, 20 Jun 2014 09:32:05 +0000 (+0800) Subject: mtd: devices: elm: fix elm_context_save() and elm_context_restore() functions X-Git-Tag: v3.14.14~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f4a407b32de430e751a24e8d579af36ac74d99b3;p=profile%2Fcommon%2Fkernel-common.git 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 Acked-by: Pekon Gupta Signed-off-by: Brian Norris Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c index d1dd6a3..3059a7a 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; }