diff options
| author | Stephan Gerhold <[email protected]> | 2025-04-07 11:54:21 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-10-30 11:04:51 -0600 |
| commit | fef8c84b57fd305205a13984530e81af6bf81ac3 (patch) | |
| tree | 92354ac71c5a959f7e90446b9208a77f4762a962 | |
| parent | cd44b44e595d16e5dfa90b1f73b9f0fbb3f1c037 (diff) | |
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 <[email protected]>
Acked-by: Caleb Connolly <[email protected]>
Tested-by: Sam Day <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Casey Connolly <[email protected]>
| -rw-r--r-- | drivers/usb/host/ehci-msm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c index a759aea9db3..dd1d527a3a2 100644 --- a/drivers/usb/host/ehci-msm.c +++ b/drivers/usb/host/ehci-msm.c @@ -141,7 +141,7 @@ static int ehci_usb_of_to_plat(struct udevice *dev) priv->ulpi_vp.port_num = 0; priv->ehci = dev_read_addr_ptr(dev); - if (priv->ehci == (void *)FDT_ADDR_T_NONE) + if (!priv->ehci) return -EINVAL; /* Warning: this will not work if viewport address is > 64 bit due to |
