[PATCH] phy: usb: sunplus: Fix potential null-ptr-deref in sp_usb_phy_probe()

Vinod Koul vkoul at kernel.org
Thu Jan 12 10:14:47 PST 2023


On 25-11-22, 10:12, Shang XiaoJing wrote:
> sp_usb_phy_probe() will call platform_get_resource_byname() that may fail
> and return NULL. devm_ioremap() will use usbphy->moon4_res_mem->start as
> input, which may causes null-ptr-deref. Check the ret value of
> platform_get_resource_byname() to avoid the null-ptr-deref.

Applied, thanks

-- 
~Vinod



More information about the linux-phy mailing list