Re: [PATCH v2] usb: chipidea: host: fix port index underflow and UBSAN complains

Greg KH
2021-06-18T07:45:13Z

On Fri, Jun 18, 2021 at 03:04:39PM +0800, Li Jun wrote:
> If wIndex is 0 (and it often is), these calculations underflow and
> UBSAN complains, here resolve this by not decrementing the index when
> it is equal to 0, this copies the solution from commit 85e3990bea49
> ("USB: EHCI: avoid undefined pointer arithmetic and placate UBSAN")
>
> Reported-by: zhipeng.wang <zhipeng.wang_1@nxp.com>

Please use a name here that makes sense, "Zhipeng Wang"?

thanks,

greg k-h