ALSA: xen-front: Do not use stream buffer size before it is set

This fixes the regression introduced while moving to Xen shared
buffer implementation.

Fixes: 58f9d806d1 ("ALSA: xen-front: Use Xen common shared buffer implementation")
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Cc: <stable@vger.kernel.org> # v5.0+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Oleksandr Andrushchenko 2019-04-04 15:38:38 +03:00 committed by Takashi Iwai
parent 80690a276f
commit 8b030a57e3

View File

@ -441,7 +441,7 @@ static int shbuf_setup_backstore(struct xen_snd_front_pcm_stream_info *stream,
{
int i;
stream->buffer = alloc_pages_exact(stream->buffer_sz, GFP_KERNEL);
stream->buffer = alloc_pages_exact(buffer_sz, GFP_KERNEL);
if (!stream->buffer)
return -ENOMEM;