usb: musb-new: Null check before dereference
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Tue, 30 Sep 2025 15:52:22 +0000 (16:52 +0100)
committerMarek Vasut <marek.vasut+usb@mailbox.org>
Tue, 28 Oct 2025 15:35:05 +0000 (16:35 +0100)
commit6ea91bf8055b18b24828c449e33572ca9a9832eb
tree3cff61967bacc7a260a4fc69805a4395ccc420f4
parentadcec085e0dd3e399e6ee5ab5a7dd0e3cd192316
usb: musb-new: Null check before dereference

A null check for the variable 'data' was introduced before dereferencing
it for set_phy_power but other uses were not so protected. Add the null
check for other dereferences of 'data'.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
drivers/usb/musb-new/am35x.c