diff options
| -rw-r--r-- | sound/soc/soc-generic-dmaengine-pcm.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index b329b84bc5af..4864392bfcba 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c | |||
| @@ -200,11 +200,6 @@ static int dmaengine_pcm_open(struct snd_pcm_substream *substream) | |||
| 200 | return snd_dmaengine_pcm_open(substream, chan); | 200 | return snd_dmaengine_pcm_open(substream, chan); |
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | static void dmaengine_pcm_free(struct snd_pcm *pcm) | ||
| 204 | { | ||
| 205 | snd_pcm_lib_preallocate_free_for_all(pcm); | ||
| 206 | } | ||
| 207 | |||
| 208 | static struct dma_chan *dmaengine_pcm_compat_request_channel( | 203 | static struct dma_chan *dmaengine_pcm_compat_request_channel( |
| 209 | struct snd_soc_pcm_runtime *rtd, | 204 | struct snd_soc_pcm_runtime *rtd, |
| 210 | struct snd_pcm_substream *substream) | 205 | struct snd_pcm_substream *substream) |
| @@ -283,8 +278,7 @@ static int dmaengine_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
| 283 | if (!pcm->chan[i]) { | 278 | if (!pcm->chan[i]) { |
| 284 | dev_err(rtd->platform->dev, | 279 | dev_err(rtd->platform->dev, |
| 285 | "Missing dma channel for stream: %d\n", i); | 280 | "Missing dma channel for stream: %d\n", i); |
| 286 | ret = -EINVAL; | 281 | return -EINVAL; |
| 287 | goto err_free; | ||
| 288 | } | 282 | } |
| 289 | 283 | ||
| 290 | ret = snd_pcm_lib_preallocate_pages(substream, | 284 | ret = snd_pcm_lib_preallocate_pages(substream, |
| @@ -293,7 +287,7 @@ static int dmaengine_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
| 293 | prealloc_buffer_size, | 287 | prealloc_buffer_size, |
| 294 | max_buffer_size); | 288 | max_buffer_size); |
| 295 | if (ret) | 289 | if (ret) |
| 296 | goto err_free; | 290 | return ret; |
| 297 | 291 | ||
| 298 | /* | 292 | /* |
| 299 | * This will only return false if we know for sure that at least | 293 | * This will only return false if we know for sure that at least |
| @@ -307,10 +301,6 @@ static int dmaengine_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
| 307 | } | 301 | } |
| 308 | 302 | ||
| 309 | return 0; | 303 | return 0; |
| 310 | |||
| 311 | err_free: | ||
| 312 | dmaengine_pcm_free(rtd->pcm); | ||
| 313 | return ret; | ||
| 314 | } | 304 | } |
| 315 | 305 | ||
| 316 | static snd_pcm_uframes_t dmaengine_pcm_pointer( | 306 | static snd_pcm_uframes_t dmaengine_pcm_pointer( |
| @@ -341,7 +331,6 @@ static const struct snd_soc_platform_driver dmaengine_pcm_platform = { | |||
| 341 | }, | 331 | }, |
| 342 | .ops = &dmaengine_pcm_ops, | 332 | .ops = &dmaengine_pcm_ops, |
| 343 | .pcm_new = dmaengine_pcm_new, | 333 | .pcm_new = dmaengine_pcm_new, |
| 344 | .pcm_free = dmaengine_pcm_free, | ||
| 345 | }; | 334 | }; |
| 346 | 335 | ||
| 347 | static const char * const dmaengine_pcm_dma_channel_names[] = { | 336 | static const char * const dmaengine_pcm_dma_channel_names[] = { |
