]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: rsnd: check the Gen1 at the beginning of DVC probe
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 15 Jul 2015 07:15:47 +0000 (07:15 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 16 Jul 2015 21:29:22 +0000 (22:29 +0100)
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>
sound/soc/sh/rcar/dvc.c

index d06e4ee91f8d9e0c3a2e50bcf1909aaa1861a751..57796387d482303bc84c29212dfed167685ae6fe 100644 (file)
@@ -332,18 +332,18 @@ int rsnd_dvc_probe(struct platform_device *pdev,
        char name[RSND_DVC_NAME_SIZE];
        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 */
        if (rsnd_is_gen1(priv)) {
                dev_warn(dev, "CMD is not supported on Gen1\n");
                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);
        if (!dvc)
                return -ENOMEM;