[PATCH] drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion again
Neil Armstrong
neil.armstrong at linaro.org
Thu Mar 9 08:09:24 PST 2023
On 09/03/2023 16:24, Marek Szyprowski wrote:
> 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 at collabora.com>
> Fixes: 67d0a30128c9 ("drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion")
> Signed-off-by: Marek Szyprowski <m.szyprowski at samsung.com>
> ---
> drivers/gpu/drm/meson/meson_dw_hdmi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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,
Acked-by: Neil Armstrong <neil.armstrong at linaro.org>
More information about the linux-amlogic
mailing list