lkml.org 
[lkml]   [2020]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.5 228/257] clk: ingenic/TCU: Fix round_rate returning error
    Date
    From: Paul Cercueil <paul@crapouillou.net>

    commit edcc42945dee85e9dec3737f3dbf59d917ae5418 upstream.

    When requesting a rate superior to the parent's rate, it would return
    -EINVAL instead of simply returning the parent's rate like it should.

    Fixes: 4f89e4b8f121 ("clk: ingenic: Add driver for the TCU clocks")
    Cc: stable@vger.kernel.org
    Signed-off-by: Paul Cercueil <paul@crapouillou.net>
    Link: https://lkml.kernel.org/r/20200213161952.37460-2-paul@crapouillou.net
    Signed-off-by: Stephen Boyd <sboyd@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/clk/ingenic/tcu.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/clk/ingenic/tcu.c
    +++ b/drivers/clk/ingenic/tcu.c
    @@ -189,7 +189,7 @@ static long ingenic_tcu_round_rate(struc
    u8 prescale;

    if (req_rate > rate)
    - return -EINVAL;
    + return rate;

    prescale = ingenic_tcu_get_prescale(rate, req_rate);


    \
     
     \ /
      Last update: 2020-04-16 16:02    [W:2.542 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site