提交 d0064a1b 编写于 作者: T Takashi Iwai

Merge branch 'topic/cleanup' into for-linus

* topic/cleanup:
  ALSA: info - Use krealloc()
......@@ -88,12 +88,10 @@ static int resize_info_buffer(struct snd_info_buffer *buffer,
char *nbuf;
nsize = PAGE_ALIGN(nsize);
nbuf = kmalloc(nsize, GFP_KERNEL);
nbuf = krealloc(buffer->buffer, nsize, GFP_KERNEL);
if (! nbuf)
return -ENOMEM;
memcpy(nbuf, buffer->buffer, buffer->len);
kfree(buffer->buffer);
buffer->buffer = nbuf;
buffer->len = nsize;
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册