diff options
Diffstat (limited to 'sound/core/compress_offload.c')
-rw-r--r-- | sound/core/compress_offload.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index 1f69863a83d2..52ca4cce1462 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -272,10 +272,12 @@ static ssize_t snd_compr_write(struct file *f, const char __user *buf, if (avail > count) avail = count; - if (stream->ops->copy) - retval = stream->ops->copy(stream, buf, avail); - else + if (stream->ops->copy) { + char __user* cbuf = (char __user*)buf; + retval = stream->ops->copy(stream, cbuf, avail); + } else { retval = snd_compr_write_data(stream, buf, avail); + } if (retval > 0) stream->runtime->total_bytes_available += retval; |