From: Takashi Iwai Date: Thu, 10 Sep 2009 13:32:43 +0000 (+0200) Subject: Merge branch 'topic/cleanup' into for-linus X-Git-Tag: v2.6.32-rc1~732^2~20 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=d0064a1b22d0f60058902a870e6bf9aab0d8202c;hp=b81e5ab34d960335c71ce33bf283ff5a22463a67 Merge branch 'topic/cleanup' into for-linus * topic/cleanup: ALSA: info - Use krealloc() --- diff --git a/sound/core/info.c b/sound/core/info.c index 35df614f6c55..3d1f5137420a 100644 --- a/sound/core/info.c +++ b/sound/core/info.c @@ -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;