drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion again
devm_regulator_get_enable_optional() returns -ENODEV if requested optional regulator is not present. Adjust code for that, because in the67d0a30128
I've incorrectly assumed that it also returns 0 when regulator is not present. Reported-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com> Fixes:67d0a30128
("drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion") Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Acked-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230309152446.104913-1-m.szyprowski@samsung.com
This commit is contained in:
parent
0d3c9333d9
commit
4028cbf867
|
@ -718,7 +718,7 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,
|
||||||
dw_plat_data = &meson_dw_hdmi->dw_plat_data;
|
dw_plat_data = &meson_dw_hdmi->dw_plat_data;
|
||||||
|
|
||||||
ret = devm_regulator_get_enable_optional(dev, "hdmi");
|
ret = devm_regulator_get_enable_optional(dev, "hdmi");
|
||||||
if (ret < 0)
|
if (ret < 0 && ret != -ENODEV)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
meson_dw_hdmi->hdmitx_apb = devm_reset_control_get_exclusive(dev,
|
meson_dw_hdmi->hdmitx_apb = devm_reset_control_get_exclusive(dev,
|
||||||
|
|
Loading…
Reference in New Issue