diff options
| author | Takashi Iwai <tiwai@suse.de> | 2018-07-29 22:38:54 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2018-07-29 22:39:29 +0200 |
| commit | 16c796e8fac353d736055322ca6a38ba3c49f5e2 (patch) | |
| tree | a8557b6c660d067834ece2421a1d6ffe990b60af /sound/core/memalloc.c | |
| parent | f69548ffafcc4942022f16f2f192b24143de1dba (diff) | |
| parent | f59cf9a0551dd954ad8b752461cf19d9789f4b1d (diff) | |
Merge branch 'for-linus' into topic/virmidi
Pull the latest ALSA sequencer fixes for the further development of
virmidi.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/memalloc.c')
| -rw-r--r-- | sound/core/memalloc.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c index 7f89d3c79a4b..753d5fc4b284 100644 --- a/sound/core/memalloc.c +++ b/sound/core/memalloc.c @@ -242,16 +242,12 @@ int snd_dma_alloc_pages_fallback(int type, struct device *device, size_t size, int err; while ((err = snd_dma_alloc_pages(type, device, size, dmab)) < 0) { - size_t aligned_size; if (err != -ENOMEM) return err; if (size <= PAGE_SIZE) return -ENOMEM; - aligned_size = PAGE_SIZE << get_order(size); - if (size != aligned_size) - size = aligned_size; - else - size >>= 1; + size >>= 1; + size = PAGE_SIZE << get_order(size); } if (! dmab->area) return -ENOMEM; |
