aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tty_io.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-05-07 23:37:51 -0400
committerPaul Mackerras <paulus@samba.org>2007-05-07 23:37:51 -0400
commit02bbc0f09c90cefdb2837605c96a66c5ce4ba2e1 (patch)
tree04ef573cd4de095c500c9fc3477f4278c0b36300 /drivers/char/tty_io.c
parent7487a2245b8841c77ba9db406cf99a483b9334e9 (diff)
parent5b94f675f57e4ff16c8fda09088d7480a84dcd91 (diff)
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/char/tty_io.c')
-rw-r--r--drivers/char/tty_io.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 7a32df594907..389da364e6b6 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -3720,11 +3720,10 @@ int tty_register_driver(struct tty_driver *driver)
3720 if (driver->flags & TTY_DRIVER_INSTALLED) 3720 if (driver->flags & TTY_DRIVER_INSTALLED)
3721 return 0; 3721 return 0;
3722 3722
3723 if (!(driver->flags & TTY_DRIVER_DEVPTS_MEM)) { 3723 if (!(driver->flags & TTY_DRIVER_DEVPTS_MEM) && driver->num) {
3724 p = kmalloc(driver->num * 3 * sizeof(void *), GFP_KERNEL); 3724 p = kzalloc(driver->num * 3 * sizeof(void *), GFP_KERNEL);
3725 if (!p) 3725 if (!p)
3726 return -ENOMEM; 3726 return -ENOMEM;
3727 memset(p, 0, driver->num * 3 * sizeof(void *));
3728 } 3727 }
3729 3728
3730 if (!driver->major) { 3729 if (!driver->major) {