clk: tegra: Do not print errors for clk_round_rate()
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / clk / tegra / clk-pll.c
index 689c468..8eb2755 100644 (file)
@@ -435,9 +435,6 @@ static int _calc_rate(struct clk_hw *hw, struct tegra_clk_pll_freq_table *cfg,
        if (cfg->m > divm_max(pll) || cfg->n > divn_max(pll) ||
            (1 << p_div) > divp_max(pll)
            || cfg->output_rate > pll->params->vco_max) {
-               pr_err("%s: Failed to set %s rate %lu\n",
-                      __func__, __clk_get_name(hw->clk), rate);
-               WARN_ON(1);
                return -EINVAL;
        }
 
@@ -584,6 +581,8 @@ static int clk_pll_set_rate(struct clk_hw *hw, unsigned long rate,
 
        if (_get_table_rate(hw, &cfg, rate, parent_rate) &&
            _calc_rate(hw, &cfg, rate, parent_rate)) {
+               pr_err("%s: Failed to set %s rate %lu\n", __func__,
+                      __clk_get_name(hw->clk), rate);
                WARN_ON(1);
                return -EINVAL;
        }
@@ -615,10 +614,8 @@ static long clk_pll_round_rate(struct clk_hw *hw, unsigned long rate,
                return __clk_get_rate(hw->clk);
 
        if (_get_table_rate(hw, &cfg, rate, *prate) &&
-           _calc_rate(hw, &cfg, rate, *prate)) {
-               WARN_ON(1);
+           _calc_rate(hw, &cfg, rate, *prate))
                return -EINVAL;
-       }
 
        return cfg.output_rate;
 }