usb: chipidea: debug: check before accessing ci_role
authorMichael Thalmeier <michael.thalmeier@hale.at>
Thu, 18 May 2017 14:14:14 +0000 (16:14 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 1 Nov 2017 21:12:43 +0000 (22:12 +0100)
commit54fd65c07635e1fc5d263c169a970c9ceea1598d
tree7d8ca7874f5d949306630fa492779fdc5be09710
parentf862c9436454a5b78d29ebaebc547aa6d1474f7a
usb: chipidea: debug: check before accessing ci_role

commit 0340ff83cd4475261e7474033a381bc125b45244 upstream.

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>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/usb/chipidea/debug.c