]> www.infradead.org Git - users/dwmw2/linux.git/commit
ASoC: audio-graph-card: add missing const at graph_get_dai_id()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 11 Jul 2019 04:10:45 +0000 (13:10 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2019 06:29:45 +0000 (08:29 +0200)
commit3861684475d5e7726024de0014aba62d6e37fe4d
tree2e8e09cd6575b1abcaab50c03efbc93351afc7d8
parente5e516915f780d9ec69d07607c9da35c41873968
ASoC: audio-graph-card: add missing const at graph_get_dai_id()

[ Upstream commit ec3042ad39d4e2ddbc3a3344f90bb10d8feb53bc ]

commit c152f8491a8d9 ("ASoC: audio-graph-card: fix an use-after-free in
graph_get_dai_id()") fixups use-after-free issue,
but, it need to use "const" for reg. This patch adds it.

We will have below without this patch

LINUX/sound/soc/generic/audio-graph-card.c: In function 'graph_get_dai_id':
LINUX/sound/soc/generic/audio-graph-card.c:87:7: warning: assignment discards\
 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   reg = of_get_property(node, "reg", NULL);

Fixes: c152f8491a8d9 ("ASoC: audio-graph-card: fix an use-after-free in graph_get_dai_id()")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Wen Yang <wen.yang99@zte.com.cn>
Link: https://lore.kernel.org/r/87sgrd43ja.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/generic/audio-graph-card.c