提交 9469b8b6 编写于 作者: K Kuninori Morimoto 提交者: Mark Brown

ASoC: rsnd: check the Gen1 at the beginning of DVC probe

DVC doesn't support Gen1, check it beginning of probe
Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: NKeita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 98d358af
...@@ -332,18 +332,18 @@ int rsnd_dvc_probe(struct platform_device *pdev, ...@@ -332,18 +332,18 @@ int rsnd_dvc_probe(struct platform_device *pdev,
char name[RSND_DVC_NAME_SIZE]; char name[RSND_DVC_NAME_SIZE];
int i, nr, ret; int i, nr, ret;
rsnd_of_parse_dvc(pdev, of_data, priv);
nr = info->dvc_info_nr;
if (!nr)
return 0;
/* This driver doesn't support Gen1 at this point */ /* This driver doesn't support Gen1 at this point */
if (rsnd_is_gen1(priv)) { if (rsnd_is_gen1(priv)) {
dev_warn(dev, "CMD is not supported on Gen1\n"); dev_warn(dev, "CMD is not supported on Gen1\n");
return -EINVAL; return -EINVAL;
} }
rsnd_of_parse_dvc(pdev, of_data, priv);
nr = info->dvc_info_nr;
if (!nr)
return 0;
dvc = devm_kzalloc(dev, sizeof(*dvc) * nr, GFP_KERNEL); dvc = devm_kzalloc(dev, sizeof(*dvc) * nr, GFP_KERNEL);
if (!dvc) if (!dvc)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册