aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-07-15 03:15:47 -0400
committerMark Brown <broonie@kernel.org>2015-07-16 17:29:22 -0400
commit9469b8b6092d347ef8a5fa9d2d7dde4c857a0994 (patch)
tree54b055e31b7cf4a26f32f4b19daf73ab3a861176
parent98d358af07aa6fc4cd6cdfd3256ab792eb3675cd (diff)
ASoC: rsnd: check the Gen1 at the beginning of DVC probe
DVC doesn't support Gen1, check it beginning of probe Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/sh/rcar/dvc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c
index d06e4ee91f8d..57796387d482 100644
--- a/sound/soc/sh/rcar/dvc.c
+++ b/sound/soc/sh/rcar/dvc.c
@@ -332,18 +332,18 @@ int rsnd_dvc_probe(struct platform_device *pdev,
332 char name[RSND_DVC_NAME_SIZE]; 332 char name[RSND_DVC_NAME_SIZE];
333 int i, nr, ret; 333 int i, nr, ret;
334 334
335 rsnd_of_parse_dvc(pdev, of_data, priv);
336
337 nr = info->dvc_info_nr;
338 if (!nr)
339 return 0;
340
341 /* This driver doesn't support Gen1 at this point */ 335 /* This driver doesn't support Gen1 at this point */
342 if (rsnd_is_gen1(priv)) { 336 if (rsnd_is_gen1(priv)) {
343 dev_warn(dev, "CMD is not supported on Gen1\n"); 337 dev_warn(dev, "CMD is not supported on Gen1\n");
344 return -EINVAL; 338 return -EINVAL;
345 } 339 }
346 340
341 rsnd_of_parse_dvc(pdev, of_data, priv);
342
343 nr = info->dvc_info_nr;
344 if (!nr)
345 return 0;
346
347 dvc = devm_kzalloc(dev, sizeof(*dvc) * nr, GFP_KERNEL); 347 dvc = devm_kzalloc(dev, sizeof(*dvc) * nr, GFP_KERNEL);
348 if (!dvc) 348 if (!dvc)
349 return -ENOMEM; 349 return -ENOMEM;