mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 15:44:13 +08:00
ASoC: audio-graph-card: add missing const at graph_get_dai_id()
commitc152f8491a
("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:c152f8491a
("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>
This commit is contained in:
parent
09297c2f7a
commit
ec3042ad39
@ -63,7 +63,7 @@ static int graph_get_dai_id(struct device_node *ep)
|
|||||||
struct device_node *endpoint;
|
struct device_node *endpoint;
|
||||||
struct of_endpoint info;
|
struct of_endpoint info;
|
||||||
int i, id;
|
int i, id;
|
||||||
u32 *reg;
|
const u32 *reg;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* use driver specified DAI ID if exist */
|
/* use driver specified DAI ID if exist */
|
||||||
|
Loading…
Reference in New Issue
Block a user