Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54197
b: refs/heads/master
c: 543691a
h: refs/heads/master
i:
  54195: 7e38b15
v: v3
  • Loading branch information
Andy Whitcroft authored and Linus Torvalds committed May 7, 2007
1 parent fb55e3e commit ec4d00f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 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: b5637e65ee2cecd344b1f8ff750013f697d3ae16
refs/heads/master: 543691a6cd70b606dd9bed5e77b120c5d9c5c506
5 changes: 2 additions & 3 deletions trunk/drivers/char/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -3720,11 +3720,10 @@ int tty_register_driver(struct tty_driver *driver)
if (driver->flags & TTY_DRIVER_INSTALLED)
return 0;

if (!(driver->flags & TTY_DRIVER_DEVPTS_MEM)) {
p = kmalloc(driver->num * 3 * sizeof(void *), GFP_KERNEL);
if (!(driver->flags & TTY_DRIVER_DEVPTS_MEM) && driver->num) {
p = kzalloc(driver->num * 3 * sizeof(void *), GFP_KERNEL);
if (!p)
return -ENOMEM;
memset(p, 0, driver->num * 3 * sizeof(void *));
}

if (!driver->major) {
Expand Down

0 comments on commit ec4d00f

Please sign in to comment.