diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2018-09-06 14:14:25 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-09-06 14:14:24 -0700 |
| commit | c44da670c28766ea7fa8b46453e9111965bf2eb2 (patch) | |
| tree | 79d7b94b76dc3eb27d74ef7be44e2f88e1dc39f8 /sound/core/memalloc.c | |
| parent | 356bd90ee7d4caac787e2c4c9da68b585b7cf48b (diff) | |
| parent | b87d31674ac9e8203f3a30b53f6a697bf5cf36b6 (diff) | |
Merge "Merge android-4.4.153 (5e24b4e) into msm-4.4"
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 f05cb6a8cbe0..78ffe445d775 100644 --- a/sound/core/memalloc.c +++ b/sound/core/memalloc.c @@ -239,16 +239,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; |
