mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 21:19:04 -04:00
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: Michael Thalmeier <michael.thalmeier@hale.at> Signed-off-by: Peter Chen <peter.chen@nxp.com>
This commit is contained in:
parent
aa1f058d7d
commit
0340ff83cd
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue