projects
/
wrapfs-4.14.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e432f1d
)
usb: chipidea: debug: check before accessing ci_role
author
Michael Thalmeier
<michael.thalmeier@hale.at>
Thu, 18 May 2017 14:14:14 +0000
(16:14 +0200)
committer
Ben Hutchings
<ben@decadent.org.uk>
Fri, 15 Sep 2017 17:29:48 +0000
(18:29 +0100)
commit
0340ff83cd4475261e7474033a381bc125b45244
upstream.
ci_role BUGs when the role is >= CI_ROLE_END.
Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/chipidea/debug.c
patch
|
blob
|
history
diff --git
a/drivers/usb/chipidea/debug.c
b/drivers/usb/chipidea/debug.c
index 09a54c731852383a61ebcd493db4d05ad596bf28..39332d3bfd9acdbe25cbff11c9c5bea57dec6b95 100644
(file)
--- a/
drivers/usb/chipidea/debug.c
+++ b/
drivers/usb/chipidea/debug.c
@@
-286,7
+286,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;
}