]> git.baikalelectronics.ru Git - kernel.git/commit
usb: chipidea: udc: check request status before setting device address
authorXu Yang <xu.yang_2@nxp.com>
Thu, 23 Jun 2022 03:02:42 +0000 (11:02 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Jun 2022 11:45:23 +0000 (13:45 +0200)
commite89ab8ef46a9e93094223cccc7ee4d18fa2212f6
tree73d46d3ddfb5a39f4c49e1c8e500e57a84fe4643
parent8c5bb66168dcf64bda58a7f9b2c39e7fab3e48c1
usb: chipidea: udc: check request status before setting device address

The complete() function may be called even though request is not
completed. In this case, it's necessary to check request status so
as not to set device address wrongly.

Fixes: 1c3890f3f0e7 ("usb: chipidea: udc: update gadget states according to ch9")
cc: <stable@vger.kernel.org>
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Link: https://lore.kernel.org/r/20220623030242.41796-1-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/udc.c