Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113480
b: refs/heads/master
c: 402fda9
h: refs/heads/master
v: v3
  • Loading branch information
Jason Wessel authored and Linus Torvalds committed Oct 13, 2008
1 parent f601f99 commit 8e9ee5c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8440838bc5337243917f13bc14ea2445da5e0197
refs/heads/master: 402fda9201ac619ea1f120996b1a142c57aeeb6b
8 changes: 4 additions & 4 deletions trunk/drivers/char/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 .. */
Expand Down

0 comments on commit 8e9ee5c

Please sign in to comment.