diff options
author | Andy Whitcroft | 2007-05-06 23:49:33 +0200 |
---|---|---|
committer | Linus Torvalds | 2007-05-07 21:12:53 +0200 |
commit | 543691a6cd70b606dd9bed5e77b120c5d9c5c506 (patch) | |
tree | 91d1033d6699e28393c7a2cae63727ac22db92ac /mm/slub.c | |
parent | i386: use page allocator to allocate thread_info structure (diff) | |
download | kernel-qcow2-linux-543691a6cd70b606dd9bed5e77b120c5d9c5c506.tar.gz kernel-qcow2-linux-543691a6cd70b606dd9bed5e77b120c5d9c5c506.tar.xz kernel-qcow2-linux-543691a6cd70b606dd9bed5e77b120c5d9c5c506.zip |
tty_register_driver: only allocate tty instances when defined
If device->num is zero we attempt to kmalloc() zero bytes. When SLUB is
enabled this returns a null pointer and take that as an allocation failure
and fail the device register. Check for no devices and avoid the
allocation.
[akpm: opportunistic kzalloc() conversion]
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slub.c')
0 files changed, 0 insertions, 0 deletions