]> git.dujemihanovic.xyz Git - u-boot.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)
commit1f54025d70c4c9e6ec8d82d8b69b0d66a7bbbdc1
tree9bef96af751771bf32ddce1e9f80d35fd27b093a
parent96991e652f541323a03c5b7e075d54a117091618
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