diff options
Diffstat (limited to 'sound/core/sgbuf.c')
-rw-r--r-- | sound/core/sgbuf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/core/sgbuf.c b/sound/core/sgbuf.c index feefdfc3bcca..29ddb76187e5 100644 --- a/sound/core/sgbuf.c +++ b/sound/core/sgbuf.c @@ -9,7 +9,6 @@ #include <linux/mm.h> #include <linux/vmalloc.h> #include <linux/export.h> -#include <asm/pgtable.h> #include <sound/memalloc.h> @@ -143,6 +142,9 @@ unsigned int snd_sgbuf_get_chunk_size(struct snd_dma_buffer *dmab, struct snd_sg_buf *sg = dmab->private_data; unsigned int start, end, pg; + if (!sg) + return size; + start = ofs >> PAGE_SHIFT; end = (ofs + size - 1) >> PAGE_SHIFT; /* check page continuity */ |