[alsa-devel] [PATCH v2 2/6] ASoC: sirf: add I2S CPU DAI driver

Timur Tabi timur at tabi.org
Sun Oct 27 23:41:56 EDT 2013


On Sun, Oct 27, 2013 at 5:37 PM, Barry Song <21cnbao at gmail.com> wrote:
> +       si2s->sirf_pcm_pdev = platform_device_register_simple("sirf-pcm-audio",
> +                       0, NULL, 0);
> +       if (IS_ERR(si2s->sirf_pcm_pdev))
> +               return PTR_ERR(si2s->sirf_pcm_pdev);
> +
> +       platform_set_drvdata(pdev, si2s);
> +
> +       spin_lock_init(&si2s->lock);
> +
> +       ret = of_property_read_u32(pdev->dev.of_node,
> +                       "sirf,i2s-dma-rx-channel", &rx_dma_ch);
> +       if (ret < 0) {
> +               dev_err(&pdev->dev, "Unable to USP0 rx dma channel\n");
> +               return ret;
> +       }

Shouldn't you also call platform_device_unregister() before the 'return' here?



More information about the linux-arm-kernel mailing list