ASoC: rt286: Fix run time error while modifying const data
authorAxel Lin <axel.lin@ingics.com>
Mon, 5 Oct 2015 13:22:40 +0000 (21:22 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 Jan 2016 19:25:48 +0000 (11:25 -0800)
commitfc0733fdbfba812928e01fbc5bf9e60dab1fb678
treef88417780ce82c8963ffdad3b31fd404dec791d9
parent06b00accf521abfdce83cf8d34069445a35799d2
ASoC: rt286: Fix run time error while modifying const data

commit dc6d84c69cf8296b1e8e2fd0b1e115b7787ef4e9 upstream.

Make a copy of memory for index_cache rather than directly use the
rt286_index_def to avoid run time error.

Fixes: c418a84a8c8f ("ASoC: Constify reg_default tables")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/rt286.c