diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2023-03-09 16:24:46 +0100 |
---|---|---|
committer | Neil Armstrong <neil.armstrong@linaro.org> | 2023-03-15 10:06:46 +0100 |
commit | 4028cbf867f70a3c599c9b0c9509334c56ed97d7 (patch) | |
tree | 687669eb7d8989868726d469a64fcd844aa67168 | |
parent | 0d3c9333d976af41d7dbc6bf4d9d2e95fbdf9c89 (diff) |
drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion againdrm-misc-fixes-2023-03-16
devm_regulator_get_enable_optional() returns -ENODEV if requested
optional regulator is not present. Adjust code for that, because in the
67d0a30128c9 I've incorrectly assumed that it also returns 0 when
regulator is not present.
Reported-by: Ricardo CaƱuelo <ricardo.canuelo@collabora.com>
Fixes: 67d0a30128c9 ("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
-rw-r--r-- | drivers/gpu/drm/meson/meson_dw_hdmi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c index 534621a13a34..3d046878ce6c 100644 --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c @@ -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; ret = devm_regulator_get_enable_optional(dev, "hdmi"); - if (ret < 0) + if (ret < 0 && ret != -ENODEV) return ret; meson_dw_hdmi->hdmitx_apb = devm_reset_control_get_exclusive(dev, |