diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2008-10-13 10:45:36 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-13 09:51:44 -0700 |
commit | 402fda9201ac619ea1f120996b1a142c57aeeb6b (patch) | |
tree | 9a0e1411e55148aac0a8dd662335b29ab2e13063 /drivers/char/tty_io.c | |
parent | 8440838bc5337243917f13bc14ea2445da5e0197 (diff) | |
download | linux-402fda9201ac619ea1f120996b1a142c57aeeb6b.tar.gz linux-402fda9201ac619ea1f120996b1a142c57aeeb6b.tar.bz2 linux-402fda9201ac619ea1f120996b1a142c57aeeb6b.zip |
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/tty_io.c')
-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( /* write_buf/write_cnt is protected by the atomic_write_lock mutex */ if (tty->write_cnt < chunk) { - unsigned char *buf; + unsigned char *buf_chunk; if (chunk < 1024) chunk = 1024; - buf = kmalloc(chunk, GFP_KERNEL); - if (!buf) { + buf_chunk = kmalloc(chunk, GFP_KERNEL); + if (!buf_chunk) { ret = -ENOMEM; goto out; } kfree(tty->write_buf); tty->write_cnt = chunk; - tty->write_buf = buf; + tty->write_buf = buf_chunk; } /* Do the write .. */ |