diff options
Diffstat (limited to 'sound/core/info.c')
-rw-r--r-- | sound/core/info.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/core/info.c b/sound/core/info.c index 051d55b05521..9f404e965ea2 100644 --- a/sound/core/info.c +++ b/sound/core/info.c | |||
@@ -684,7 +684,7 @@ int snd_info_card_free(struct snd_card *card) | |||
684 | * snd_info_get_line - read one line from the procfs buffer | 684 | * snd_info_get_line - read one line from the procfs buffer |
685 | * @buffer: the procfs buffer | 685 | * @buffer: the procfs buffer |
686 | * @line: the buffer to store | 686 | * @line: the buffer to store |
687 | * @len: the max. buffer size - 1 | 687 | * @len: the max. buffer size |
688 | * | 688 | * |
689 | * Reads one line from the buffer and stores the string. | 689 | * Reads one line from the buffer and stores the string. |
690 | * | 690 | * |
@@ -704,7 +704,7 @@ int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len) | |||
704 | buffer->stop = 1; | 704 | buffer->stop = 1; |
705 | if (c == '\n') | 705 | if (c == '\n') |
706 | break; | 706 | break; |
707 | if (len) { | 707 | if (len > 1) { |
708 | len--; | 708 | len--; |
709 | *line++ = c; | 709 | *line++ = c; |
710 | } | 710 | } |