clk: meson: remove duplicate logic
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 30 Jul 2019 21:03:43 +0000 (23:03 +0200)
committerNeil Armstrong <narmstrong@baylibre.com>
Wed, 31 Jul 2019 10:11:04 +0000 (12:11 +0200)
First thing we check in meson_clk_set_rate_by_id() is current_rate == rate.
There is not need to check it again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
drivers/clk/meson/gxbb.c

index 2cb53fb92d217d93fbf7c9b766130ea90f80d5b8..abb5337e78295a70d9352a18e9b48f929af1df41 100644 (file)
@@ -823,10 +823,7 @@ static ulong meson_clk_set_rate_by_id(struct clk *clk, unsigned long id,
        case CLKID_MPLL1:
        case CLKID_MPLL2:
        case CLKID_CLK81:
        case CLKID_MPLL1:
        case CLKID_MPLL2:
        case CLKID_CLK81:
-               if (current_rate != rate)
-                       return -EINVAL;
-
-               return 0;
+               return -EINVAL;
        case CLKID_VPU:
                return meson_clk_set_rate_by_id(clk,
                                meson_mux_get_parent(clk, CLKID_VPU), rate,
        case CLKID_VPU:
                return meson_clk_set_rate_by_id(clk,
                                meson_mux_get_parent(clk, CLKID_VPU), rate,