diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2022-11-29 16:42:27 -0400 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2022-12-02 12:04:39 -0400 |
commit | 90337f526c98129b0b180fc52dc5f57d8e7a8614 (patch) | |
tree | d7458a03027cde56b8191f656dc5cdf1531a767d /sound/soc/stm/stm32_adfsdm.c | |
parent | 169dd5c987e60e62aa5785b30d22ded2ae000286 (diff) | |
parent | b7b275e60bcd5f89771e865a8239325f86d9927d (diff) | |
download | linux-90337f526c98129b0b180fc52dc5f57d8e7a8614.tar.bz2 |
Merge tag 'v6.1-rc7' into iommufd.git for-next
Resolve conflicts in drivers/vfio/vfio_main.c by using the iommfd version.
The rc fix was done a different way when iommufd patches reworked this
code.
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'sound/soc/stm/stm32_adfsdm.c')
-rw-r--r-- | sound/soc/stm/stm32_adfsdm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/stm/stm32_adfsdm.c b/sound/soc/stm/stm32_adfsdm.c index 643fc8a17018..837c1848d9bf 100644 --- a/sound/soc/stm/stm32_adfsdm.c +++ b/sound/soc/stm/stm32_adfsdm.c @@ -304,6 +304,11 @@ static int stm32_adfsdm_dummy_cb(const void *data, void *private) return 0; } +static void stm32_adfsdm_cleanup(void *data) +{ + iio_channel_release_all_cb(data); +} + static struct snd_soc_component_driver stm32_adfsdm_soc_platform = { .open = stm32_adfsdm_pcm_open, .close = stm32_adfsdm_pcm_close, @@ -350,6 +355,12 @@ static int stm32_adfsdm_probe(struct platform_device *pdev) if (IS_ERR(priv->iio_cb)) return PTR_ERR(priv->iio_cb); + ret = devm_add_action_or_reset(&pdev->dev, stm32_adfsdm_cleanup, priv->iio_cb); + if (ret < 0) { + dev_err(&pdev->dev, "Unable to add action\n"); + return ret; + } + component = devm_kzalloc(&pdev->dev, sizeof(*component), GFP_KERNEL); if (!component) return -ENOMEM; |