Merge tag 'alsa-add-snd-sgbuf-aligned-pages' of https://git.kernel.org/pub/scm/linux...
[sfrench/cifs-2.6.git] / sound / soc / uniphier / aio-cpu.c
index 80daec17be258ac3d8e616c321dd91c36f3ababe..ee90e6c3937ce31e0dfb025a1c627b695c35a0a3 100644 (file)
@@ -219,15 +219,10 @@ static int uniphier_aio_set_pll(struct snd_soc_dai *dai, int pll_id,
                                unsigned int freq_out)
 {
        struct uniphier_aio *aio = uniphier_priv(dai);
-       struct device *dev = &aio->chip->pdev->dev;
        int ret;
 
        if (!is_valid_pll(aio->chip, pll_id))
                return -EINVAL;
-       if (!aio->chip->plls[pll_id].enable) {
-               dev_err(dev, "PLL(%d) is not implemented\n", pll_id);
-               return -ENOTSUPP;
-       }
 
        ret = aio_chip_set_pll(aio->chip, pll_id, freq_out);
        if (ret < 0)
@@ -624,15 +619,17 @@ int uniphier_aio_probe(struct platform_device *pdev)
                return PTR_ERR(chip->rst);
 
        chip->num_aios = chip->chip_spec->num_dais;
-       chip->aios = devm_kzalloc(dev,
-                                 sizeof(struct uniphier_aio) * chip->num_aios,
+       chip->aios = devm_kcalloc(dev,
+                                 chip->num_aios, sizeof(struct uniphier_aio),
                                  GFP_KERNEL);
        if (!chip->aios)
                return -ENOMEM;
 
        chip->num_plls = chip->chip_spec->num_plls;
-       chip->plls = devm_kzalloc(dev, sizeof(struct uniphier_aio_pll) *
-                                 chip->num_plls, GFP_KERNEL);
+       chip->plls = devm_kcalloc(dev,
+                                 chip->num_plls,
+                                 sizeof(struct uniphier_aio_pll),
+                                 GFP_KERNEL);
        if (!chip->plls)
                return -ENOMEM;
        memcpy(chip->plls, chip->chip_spec->plls,