diff options
Diffstat (limited to 'sound/core/info.c')
-rw-r--r-- | sound/core/info.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sound/core/info.c b/sound/core/info.c index 8ab72e0f5932..bcf6a48cc70d 100644 --- a/sound/core/info.c +++ b/sound/core/info.c | |||
@@ -344,12 +344,12 @@ static ssize_t snd_info_text_entry_write(struct file *file, | |||
344 | } | 344 | } |
345 | } | 345 | } |
346 | if (next > buf->len) { | 346 | if (next > buf->len) { |
347 | char *nbuf = krealloc(buf->buffer, PAGE_ALIGN(next), | 347 | char *nbuf = kvzalloc(PAGE_ALIGN(next), GFP_KERNEL); |
348 | GFP_KERNEL | __GFP_ZERO); | ||
349 | if (!nbuf) { | 348 | if (!nbuf) { |
350 | err = -ENOMEM; | 349 | err = -ENOMEM; |
351 | goto error; | 350 | goto error; |
352 | } | 351 | } |
352 | kvfree(buf->buffer); | ||
353 | buf->buffer = nbuf; | 353 | buf->buffer = nbuf; |
354 | buf->len = PAGE_ALIGN(next); | 354 | buf->len = PAGE_ALIGN(next); |
355 | } | 355 | } |
@@ -427,7 +427,7 @@ static int snd_info_text_entry_release(struct inode *inode, struct file *file) | |||
427 | single_release(inode, file); | 427 | single_release(inode, file); |
428 | kfree(data->rbuffer); | 428 | kfree(data->rbuffer); |
429 | if (data->wbuffer) { | 429 | if (data->wbuffer) { |
430 | kfree(data->wbuffer->buffer); | 430 | kvfree(data->wbuffer->buffer); |
431 | kfree(data->wbuffer); | 431 | kfree(data->wbuffer); |
432 | } | 432 | } |
433 | 433 | ||
@@ -652,7 +652,6 @@ int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len) | |||
652 | *line = '\0'; | 652 | *line = '\0'; |
653 | return 0; | 653 | return 0; |
654 | } | 654 | } |
655 | |||
656 | EXPORT_SYMBOL(snd_info_get_line); | 655 | EXPORT_SYMBOL(snd_info_get_line); |
657 | 656 | ||
658 | /** | 657 | /** |
@@ -690,7 +689,6 @@ const char *snd_info_get_str(char *dest, const char *src, int len) | |||
690 | src++; | 689 | src++; |
691 | return src; | 690 | return src; |
692 | } | 691 | } |
693 | |||
694 | EXPORT_SYMBOL(snd_info_get_str); | 692 | EXPORT_SYMBOL(snd_info_get_str); |
695 | 693 | ||
696 | /* | 694 | /* |
@@ -748,7 +746,6 @@ struct snd_info_entry *snd_info_create_module_entry(struct module * module, | |||
748 | entry->module = module; | 746 | entry->module = module; |
749 | return entry; | 747 | return entry; |
750 | } | 748 | } |
751 | |||
752 | EXPORT_SYMBOL(snd_info_create_module_entry); | 749 | EXPORT_SYMBOL(snd_info_create_module_entry); |
753 | 750 | ||
754 | /** | 751 | /** |
@@ -772,7 +769,6 @@ struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card, | |||
772 | } | 769 | } |
773 | return entry; | 770 | return entry; |
774 | } | 771 | } |
775 | |||
776 | EXPORT_SYMBOL(snd_info_create_card_entry); | 772 | EXPORT_SYMBOL(snd_info_create_card_entry); |
777 | 773 | ||
778 | static void snd_info_disconnect(struct snd_info_entry *entry) | 774 | static void snd_info_disconnect(struct snd_info_entry *entry) |
@@ -815,7 +811,6 @@ void snd_info_free_entry(struct snd_info_entry * entry) | |||
815 | entry->private_free(entry); | 811 | entry->private_free(entry); |
816 | kfree(entry); | 812 | kfree(entry); |
817 | } | 813 | } |
818 | |||
819 | EXPORT_SYMBOL(snd_info_free_entry); | 814 | EXPORT_SYMBOL(snd_info_free_entry); |
820 | 815 | ||
821 | /** | 816 | /** |
@@ -858,7 +853,6 @@ int snd_info_register(struct snd_info_entry * entry) | |||
858 | mutex_unlock(&info_mutex); | 853 | mutex_unlock(&info_mutex); |
859 | return 0; | 854 | return 0; |
860 | } | 855 | } |
861 | |||
862 | EXPORT_SYMBOL(snd_info_register); | 856 | EXPORT_SYMBOL(snd_info_register); |
863 | 857 | ||
864 | /* | 858 | /* |