mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-23 02:12:08 +01:00
usb: host: ehci-msm: Fix pointer check
dev_read_addr_ptr() returns a null pointer on error, not FDT_ADDR_T_NONE.
Fixes: 2be1130a9305 ("usb: ehci-msm: Use dev interface to get device address")
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Acked-by: Caleb Connolly <caleb.connolly@linaro.org>
Tested-by: Sam Day <me@samcday.com>
Link: https://patch.msgid.link/20250407-ehci-msm-fixes-v1-1-f8b30eb05d07@linaro.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
This commit is contained in:
parent
cd44b44e59
commit
fef8c84b57
@ -141,7 +141,7 @@ static int ehci_usb_of_to_plat(struct udevice *dev)
|
|||||||
priv->ulpi_vp.port_num = 0;
|
priv->ulpi_vp.port_num = 0;
|
||||||
priv->ehci = dev_read_addr_ptr(dev);
|
priv->ehci = dev_read_addr_ptr(dev);
|
||||||
|
|
||||||
if (priv->ehci == (void *)FDT_ADDR_T_NONE)
|
if (!priv->ehci)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/* Warning: this will not work if viewport address is > 64 bit due to
|
/* Warning: this will not work if viewport address is > 64 bit due to
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user