]> git.baikalelectronics.ru Git - uboot.git/commit
usb: gadget: ci: Avoid null pointer dereference
authorMarek Vasut <marex@denx.de>
Fri, 28 Jan 2022 03:39:09 +0000 (04:39 +0100)
committerMarek Vasut <marex@denx.de>
Fri, 11 Feb 2022 00:30:43 +0000 (01:30 +0100)
commitfc74854305fba63ed2625423a120d3f5a91c2cd8
tree9bef96af751771bf32ddce1e9f80d35fd27b093a
parentf2f3c39bae75fe48665ed699e2fa6b65d7ebdda6
usb: gadget: ci: Avoid null pointer dereference

The ci_req->hw_buf can be NULL, test whether it is and if so,
avoid accessing it. Else, the system may crash.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Peter Chen <peter.chen@nxp.com>
Cc: Li Jun <jun.li@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
drivers/usb/gadget/ci_udc.c