Skip to content

Commit 4028cbf

Browse files
mszyprowsuperna9999
authored andcommitted
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 the 67d0a30 I've incorrectly assumed that it also returns 0 when regulator is not present. Reported-by: Ricardo Cañuelo <[email protected]> Fixes: 67d0a30 ("drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion") Signed-off-by: Marek Szyprowski <[email protected]> Acked-by: Martin Blumenstingl <[email protected]> Acked-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 0d3c933 commit 4028cbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/meson/meson_dw_hdmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,
718718
dw_plat_data = &meson_dw_hdmi->dw_plat_data;
719719

720720
ret = devm_regulator_get_enable_optional(dev, "hdmi");
721-
if (ret < 0)
721+
if (ret < 0 && ret != -ENODEV)
722722
return ret;
723723

724724
meson_dw_hdmi->hdmitx_apb = devm_reset_control_get_exclusive(dev,

0 commit comments

Comments
 (0)