summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-02-09 08:05:22 (GMT)
committerMark Brown <broonie@kernel.org>2015-02-09 08:24:31 (GMT)
commit0b1f6ec7a5fb3faff1a62afee132dac316eec63d (patch)
treef173f32060ed7007d09f247f1097bef6611de160 /sound/soc
parentbfa76d49576599a4b9f9b7a71f23d73d6dcff735 (diff)
downloadlinux-0b1f6ec7a5fb3faff1a62afee132dac316eec63d.tar.xz
ASoC: rsnd: set device data before snd_soc_register_platform/component
Set device data before snd_soc_register_platform/component. Otherwise, it will use NULL pointer if user calls unbind -> bind or rmmod -> insmod Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/sh/rcar/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 75308bb..fc227d3 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -1268,6 +1268,8 @@ static int rsnd_probe(struct platform_device *pdev)
goto exit_snd_probe;
}
+ dev_set_drvdata(dev, priv);
+
/*
* asoc register
*/
@@ -1284,8 +1286,6 @@ static int rsnd_probe(struct platform_device *pdev)
goto exit_snd_soc;
}
- dev_set_drvdata(dev, priv);
-
pm_runtime_enable(dev);
dev_info(dev, "probed\n");