aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-12-01 03:31:38 -0500
committerMark Brown <broonie@kernel.org>2015-12-01 08:19:06 -0500
commit2ff2ecca06d5302782c73626b841a509a9b01ef6 (patch)
tree8c49526e310864f961cf9da2b678f4882d86f30e /sound/soc/sh
parent186fadc132f0d634c7b43202a240fbd3654b6623 (diff)
ASoC: rsnd: fixup wrong snd_soc_dai_driver pointer access
drv pointer should be "base + offset" instead of "current + offset". This patch fixup this issue, otherwise third and subsequent pointer will be broken Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r--sound/soc/sh/rcar/core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index b187a8927e29..f1d7af114a31 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -603,7 +603,7 @@ static int rsnd_dai_probe(struct rsnd_priv *priv)
603 struct device_node *playback, *capture; 603 struct device_node *playback, *capture;
604 struct rsnd_dai_stream *io_playback; 604 struct rsnd_dai_stream *io_playback;
605 struct rsnd_dai_stream *io_capture; 605 struct rsnd_dai_stream *io_capture;
606 struct snd_soc_dai_driver *drv; 606 struct snd_soc_dai_driver *rdrv, *drv;
607 struct rsnd_dai *rdai; 607 struct rsnd_dai *rdai;
608 struct device *dev = rsnd_priv_to_dev(priv); 608 struct device *dev = rsnd_priv_to_dev(priv);
609 int nr, dai_i, io_i, np_i; 609 int nr, dai_i, io_i, np_i;
@@ -616,15 +616,15 @@ static int rsnd_dai_probe(struct rsnd_priv *priv)
616 goto rsnd_dai_probe_done; 616 goto rsnd_dai_probe_done;
617 } 617 }
618 618
619 drv = devm_kzalloc(dev, sizeof(*drv) * nr, GFP_KERNEL); 619 rdrv = devm_kzalloc(dev, sizeof(*rdrv) * nr, GFP_KERNEL);
620 rdai = devm_kzalloc(dev, sizeof(*rdai) * nr, GFP_KERNEL); 620 rdai = devm_kzalloc(dev, sizeof(*rdai) * nr, GFP_KERNEL);
621 if (!drv || !rdai) { 621 if (!rdrv || !rdai) {
622 ret = -ENOMEM; 622 ret = -ENOMEM;
623 goto rsnd_dai_probe_done; 623 goto rsnd_dai_probe_done;
624 } 624 }
625 625
626 priv->rdai_nr = nr; 626 priv->rdai_nr = nr;
627 priv->daidrv = drv; 627 priv->daidrv = rdrv;
628 priv->rdai = rdai; 628 priv->rdai = rdai;
629 629
630 /* 630 /*
@@ -633,7 +633,7 @@ static int rsnd_dai_probe(struct rsnd_priv *priv)
633 dai_i = 0; 633 dai_i = 0;
634 for_each_child_of_node(dai_node, dai_np) { 634 for_each_child_of_node(dai_node, dai_np) {
635 rdai = rsnd_rdai_get(priv, dai_i); 635 rdai = rsnd_rdai_get(priv, dai_i);
636 drv = drv + dai_i; 636 drv = rdrv + dai_i;
637 io_playback = &rdai->playback; 637 io_playback = &rdai->playback;
638 io_capture = &rdai->capture; 638 io_capture = &rdai->capture;
639 639