lkml.org 
[lkml]   [2018]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 044/109] ASoC: rsnd: adg: care clock-frequency size
    Date
    4.14-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

    [ Upstream commit 69235ccf491d2e26aefd465c0d3ccd1e3b2a9a9c ]

    ADG has buffer over flow bug if DT has more than 3 clock-frequency.
    This patch fixup this issue, and uses first 2 values.

    clock-frequency = <x y>; /* this is OK */
    clock-frequency = <x y z>; /* this is NG */

    Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
    Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    sound/soc/sh/rcar/adg.c | 5 +++++
    1 file changed, 5 insertions(+)

    --- a/sound/soc/sh/rcar/adg.c
    +++ b/sound/soc/sh/rcar/adg.c
    @@ -467,6 +467,11 @@ static void rsnd_adg_get_clkout(struct r
    goto rsnd_adg_get_clkout_end;

    req_size = prop->length / sizeof(u32);
    + if (req_size > REQ_SIZE) {
    + dev_err(dev,
    + "too many clock-frequency, use top %d\n", REQ_SIZE);
    + req_size = REQ_SIZE;
    + }

    of_property_read_u32_array(np, "clock-frequency", req_rate, req_size);
    req_48kHz_rate = 0;

    \
     
     \ /
      Last update: 2018-10-16 19:35    [W:5.723 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site