diff options
| author | Ondrej Jirman <[email protected]> | 2023-05-22 23:47:07 +0200 |
|---|---|---|
| committer | Anatolij Gustschin <[email protected]> | 2023-07-14 18:29:11 +0200 |
| commit | 7c5f278a030359d2266b63345f9f9f2890a5f17f (patch) | |
| tree | fccb15c195c43297573bb5db1588702b7730cf9c | |
| parent | dc3f2403c2ae65dea795855d97ce2bb1c2be2d35 (diff) | |
video: rockchip: dw_mipi_dsi: Correct check for lacking phy phandle
If phy is not defined in DT (eg. on rk3399), generic_phy_get_by_name
will return -ENODATA. Handle that case correctly.
Signed-off-by: Ondrej Jirman <[email protected]>
| -rw-r--r-- | drivers/video/rockchip/dw_mipi_dsi_rockchip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/rockchip/dw_mipi_dsi_rockchip.c b/drivers/video/rockchip/dw_mipi_dsi_rockchip.c index 6d8b1e6f541..fd885ac8ccb 100644 --- a/drivers/video/rockchip/dw_mipi_dsi_rockchip.c +++ b/drivers/video/rockchip/dw_mipi_dsi_rockchip.c @@ -814,9 +814,9 @@ static int dw_mipi_dsi_rockchip_probe(struct udevice *dev) * NULL if it's not initialized. */ ret = generic_phy_get_by_name(dev, "dphy", &priv->phy); - if ((ret) && (ret != -ENODEV)) { + if (ret && ret != -ENODATA) { dev_err(dev, "failed to get mipi dphy: %d\n", ret); - return -EINVAL; + return ret; } priv->pclk = devm_clk_get(dev, "pclk"); |
