usb: dwc2: Add missing null check
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Mon, 29 Sep 2025 16:40:43 +0000 (17:40 +0100)
committerMattijs Korpershoek <mkorpershoek@kernel.org>
Tue, 30 Sep 2025 09:53:10 +0000 (11:53 +0200)
commit5ac61383b2db15b037e87bd353f726eafc49e181
tree3a9ae7b11eb6027f64b0085cf77da2ab08133180
parentf58667587243ce652aaa7d0dd6557a2fb2da5020
usb: dwc2: Add missing null check

Add in the missing null check for dev->driver that is present at other
points in the function before it is dereferenced.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Reviewed-by: Marek Vasut <marek.vasut@mailbox.org>
Link: https://lore.kernel.org/r/20250929-usb_dwc2-v1-1-863133dcbcde@linaro.org
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c