diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2008-10-13 05:45:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-13 12:51:44 -0400 |
commit | 402fda9201ac619ea1f120996b1a142c57aeeb6b (patch) | |
tree | 9a0e1411e55148aac0a8dd662335b29ab2e13063 /drivers/char | |
parent | 8440838bc5337243917f13bc14ea2445da5e0197 (diff) |
tty: tty_io.c shadows sparse fix
drivers/char/tty_io.c:1413:17: warning: symbol 'buf' shadows an earlier one
drivers/char/tty_io.c:1379:20: originally declared here
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/tty_io.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 502cad68f83c..7053d6333692 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -1026,19 +1026,19 @@ static inline ssize_t do_tty_write( | |||
1026 | 1026 | ||
1027 | /* write_buf/write_cnt is protected by the atomic_write_lock mutex */ | 1027 | /* write_buf/write_cnt is protected by the atomic_write_lock mutex */ |
1028 | if (tty->write_cnt < chunk) { | 1028 | if (tty->write_cnt < chunk) { |
1029 | unsigned char *buf; | 1029 | unsigned char *buf_chunk; |
1030 | 1030 | ||
1031 | if (chunk < 1024) | 1031 | if (chunk < 1024) |
1032 | chunk = 1024; | 1032 | chunk = 1024; |
1033 | 1033 | ||
1034 | buf = kmalloc(chunk, GFP_KERNEL); | 1034 | buf_chunk = kmalloc(chunk, GFP_KERNEL); |
1035 | if (!buf) { | 1035 | if (!buf_chunk) { |
1036 | ret = -ENOMEM; | 1036 | ret = -ENOMEM; |
1037 | goto out; | 1037 | goto out; |
1038 | } | 1038 | } |
1039 | kfree(tty->write_buf); | 1039 | kfree(tty->write_buf); |
1040 | tty->write_cnt = chunk; | 1040 | tty->write_cnt = chunk; |
1041 | tty->write_buf = buf; | 1041 | tty->write_buf = buf_chunk; |
1042 | } | 1042 | } |
1043 | 1043 | ||
1044 | /* Do the write .. */ | 1044 | /* Do the write .. */ |