drm/exynos: dsi: fix exynos_dsi_set_pll() wrong return value
authorYoungJun Cho <yj44.cho@samsung.com>
Thu, 14 Aug 2014 02:22:36 +0000 (11:22 +0900)
committerInki Dae <daeinki@gmail.com>
Fri, 19 Sep 2014 15:56:08 +0000 (00:56 +0900)
The type of this function is unsigned long, and it is expected
to return proper fout value or zero if something is wrong.
So this patch fixes wrong return value for error cases.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_dsi.c

index 442aa2d0013217b500ebddad0ef63429f6dd1e00..d3393098f424982602b00efa29fe3e3fb71d8e24 100644 (file)
@@ -421,7 +421,7 @@ static unsigned long exynos_dsi_set_pll(struct exynos_dsi *dsi,
        if (!fout) {
                dev_err(dsi->dev,
                        "failed to find PLL PMS for requested frequency\n");
-               return -EFAULT;
+               return 0;
        }
        dev_dbg(dsi->dev, "PLL freq %lu, (p %d, m %d, s %d)\n", fout, p, m, s);
 
@@ -453,7 +453,7 @@ static unsigned long exynos_dsi_set_pll(struct exynos_dsi *dsi,
        do {
                if (timeout-- == 0) {
                        dev_err(dsi->dev, "PLL failed to stabilize\n");
-                       return -EFAULT;
+                       return 0;
                }
                reg = readl(dsi->reg_base + DSIM_STATUS_REG);
        } while ((reg & DSIM_PLL_STABLE) == 0);