Andy Whitcroft 543691a6cd 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>
2007-05-07 12:12:53 -07:00
..
2007-02-17 18:57:09 +01:00
2006-12-07 08:39:41 -08:00
2007-02-12 09:48:30 -08:00
2006-10-04 07:55:13 -07:00
2006-12-08 08:28:57 -08:00
2006-11-22 14:57:56 +00:00
2006-12-08 08:28:57 -08:00
2007-02-11 10:51:26 -08:00
2007-02-11 10:51:26 -08:00
2007-03-17 01:03:26 +00:00
2007-02-20 17:11:55 +00:00
2007-04-17 16:36:27 -07:00
2007-02-11 10:51:30 -08:00
2007-04-24 08:23:07 -07:00
2007-04-24 08:23:08 -07:00
2007-02-12 09:48:30 -08:00
2007-02-12 09:48:30 -08:00
2007-02-11 10:51:26 -08:00
2007-02-12 09:48:30 -08:00
2006-01-12 09:09:00 -08:00
2006-09-29 09:18:12 -07:00
2007-02-11 10:51:28 -08:00
2007-02-12 09:48:30 -08:00
2006-12-13 09:05:49 -08:00
2006-12-08 08:28:59 -08:00
2007-02-12 09:48:30 -08:00
2007-02-12 09:48:30 -08:00
2007-02-12 09:48:30 -08:00
2006-12-20 16:37:48 +11:00