Merge branch 'fix/rcar' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[linux-2.6-microblaze.git] / sound / soc / sh / rcar / adg.c
index 9665c1f..214a9ce 100644 (file)
@@ -562,6 +562,7 @@ int rsnd_adg_probe(struct rsnd_priv *priv)
        struct rsnd_adg *adg;
        struct device *dev = rsnd_priv_to_dev(priv);
        struct device_node *np = dev->of_node;
+       int ret;
 
        adg = devm_kzalloc(dev, sizeof(*adg), GFP_KERNEL);
        if (!adg) {
@@ -569,8 +570,10 @@ int rsnd_adg_probe(struct rsnd_priv *priv)
                return -ENOMEM;
        }
 
-       rsnd_mod_init(priv, &adg->mod, &adg_ops,
+       ret = rsnd_mod_init(priv, &adg->mod, &adg_ops,
                      NULL, NULL, 0, 0);
+       if (ret)
+               return ret;
 
        rsnd_adg_get_clkin(priv, adg);
        rsnd_adg_get_clkout(priv, adg);