From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:52052 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752720AbeCVKcv (ORCPT ); Thu, 22 Mar 2018 06:32:51 -0400 Subject: Patch "ASoC: rsnd: check src mod pointer for rsnd_mod_id()" has been added to the 4.9-stable tree To: kuninori.morimoto.gx@renesas.com, broonie@kernel.org, gregkh@linuxfoundation.org, linux@roeck-us.net Cc: , From: Date: Thu, 22 Mar 2018 11:32:48 +0100 Message-ID: <1521714768100100@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled ASoC: rsnd: check src mod pointer for rsnd_mod_id() to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: asoc-rsnd-check-src-mod-pointer-for-rsnd_mod_id.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 374503c6109e60f48fa9b11341b14466f07bd3f4 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 17 May 2017 06:50:32 +0000 Subject: ASoC: rsnd: check src mod pointer for rsnd_mod_id() From: Kuninori Morimoto commit 374503c6109e60f48fa9b11341b14466f07bd3f4 upstream. Without this patch, gcc 4.9.x says sound/soc/sh/rcar/cmd.c: In function 'rsnd_cmd_init': sound/soc/sh/rcar/cmd.c:85:14: warning: array subscript is below array\ bounds [-Warray-bounds] data = path[rsnd_mod_id(src)] | Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown Cc: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- sound/soc/sh/rcar/cmd.c | 3 +++ 1 file changed, 3 insertions(+) --- a/sound/soc/sh/rcar/cmd.c +++ b/sound/soc/sh/rcar/cmd.c @@ -82,6 +82,9 @@ static int rsnd_cmd_init(struct rsnd_mod [9] = 0x2, }; + if (unlikely(!src)) + return -EIO; + data = path[rsnd_mod_id(src)] | cmd_case[rsnd_mod_id(src)] << 16; } Patches currently in stable-queue which might be from kuninori.morimoto.gx@renesas.com are queue-4.9/asoc-rsnd-check-src-mod-pointer-for-rsnd_mod_id.patch