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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2017 13:05:59 +0000 (15:05 +0200)
commit5404b0c0ea852c8982a3f7ff2c4a86a80e25e840
tree4c4cd6d01a625c32b856664f2478b9035fab0a41
parent59db536f5812707e8e035b2c68590b449c7a0cec
usb: chipidea: debug: check before accessing ci_role

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/debug.c