projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa1f058
)
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
Peter Chen
<peter.chen@nxp.com>
Tue, 23 May 2017 00:36:46 +0000
(08:36 +0800)
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>
drivers/usb/chipidea/debug.c
patch
|
blob
|
history
diff --git
a/drivers/usb/chipidea/debug.c
b/drivers/usb/chipidea/debug.c
index 6d23eede4d8cda5014b041f965f3e060d201be74..1c31e8a088101ff70d3aa37553d1e9b2d906b324 100644
(file)
--- a/
drivers/usb/chipidea/debug.c
+++ b/
drivers/usb/chipidea/debug.c
@@
-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;
}