drm/stm: ltdc: return appropriate error code during probe

During probe, return the "clk_get" error value instead of -ENODEV.

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Acked-by: Philippe Cornu <philippe.cornu@st.com>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1556114601-30936-3-git-send-email-fabien.dessenne@st.com
This commit is contained in:
Fabien Dessenne 2019-04-24 16:03:21 +02:00 committed by Benjamin Gaignard
parent 9e759fc7dc
commit 1f358bc6f2
1 changed files with 3 additions and 2 deletions

View File

@ -1145,8 +1145,9 @@ int ltdc_load(struct drm_device *ddev)
ldev->pixel_clk = devm_clk_get(dev, "lcd");
if (IS_ERR(ldev->pixel_clk)) {
DRM_ERROR("Unable to get lcd clock\n");
return -ENODEV;
if (PTR_ERR(ldev->pixel_clk) != -EPROBE_DEFER)
DRM_ERROR("Unable to get lcd clock\n");
return PTR_ERR(ldev->pixel_clk);
}
if (clk_prepare_enable(ldev->pixel_clk)) {