Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0340ff83 authored by Michael Thalmeier's avatar Michael Thalmeier Committed by Peter Chen
Browse files

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: default avatarMichael Thalmeier <michael.thalmeier@hale.at>
Signed-off-by: default avatarPeter Chen <peter.chen@nxp.com>
parent aa1f058d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -294,6 +294,7 @@ static int ci_role_show(struct seq_file *s, void *data)
{
	struct ci_hdrc *ci = s->private;

	if (ci->role != CI_ROLE_END)
		seq_printf(s, "%s\n", ci_role(ci)->name);

	return 0;