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)
committerPeter Chen <peter.chen@nxp.com>
Tue, 23 May 2017 00:36:46 +0000 (08:36 +0800)
commit0340ff83cd4475261e7474033a381bc125b45244
tree6c0d26616cc466fabceb134e43ebad58060be699
parentaa1f058d7d9244423b8c5a75b9484b1115df7f02
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>
drivers/usb/chipidea/debug.c