[U-Boot] [PATCH 1/1] clk: meson: remove duplicate logic

Neil Armstrong narmstrong at baylibre.com
Wed Jul 31 07:17:32 UTC 2019


On 30/07/2019 23:03, Heinrich Schuchardt wrote:
> 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 at gmx.de>
> ---
>  drivers/clk/meson/gxbb.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
> index 2cb53fb92d..abb5337e78 100644
> --- a/drivers/clk/meson/gxbb.c
> +++ b/drivers/clk/meson/gxbb.c
> @@ -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:
> -		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,
> --
> 2.20.1
> 

Acked-by: Neil Armstrong <narmstrong at baylibre.com>

Applied on u-boot-amlogic

Thanks,
Neil


More information about the U-Boot mailing list