提交 6938ad40 编写于 作者: T Ted Juan 提交者: Brian Norris

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: NTed Juan <ted.juan@gmail.com>
Acked-by: NPekon Gupta <pekon@ti.com>
Cc: <stable@vger.kernel.org> # 3.12.x+
Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
上级 7171511e
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册