提交 0340ff83 编写于 作者: M Michael Thalmeier 提交者: Peter Chen

usb: chipidea: debug: check before accessing ci_role

ci_role BUGs when the role is >= CI_ROLE_END.

Cc: stable@vger.kernel.org  #v3.10+
Signed-off-by: NMichael Thalmeier <michael.thalmeier@hale.at>
Signed-off-by: NPeter Chen <peter.chen@nxp.com>
上级 aa1f058d
......@@ -294,7 +294,8 @@ static int ci_role_show(struct seq_file *s, void *data)
{
struct ci_hdrc *ci = s->private;
seq_printf(s, "%s\n", ci_role(ci)->name);
if (ci->role != CI_ROLE_END)
seq_printf(s, "%s\n", ci_role(ci)->name);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册