diff options
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 .. */ |