WSL2-Linux-Kernel/drivers/char
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
..
agp Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6 2007-05-05 14:55:20 -07:00
drm
hw_random PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
ip2
ipmi
mwave
pcmcia PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
rio
tpm PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
watchdog PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
.gitignore
ChangeLog
Kconfig
Makefile
amiserial.c
apm-emulation.c
applicom.c
applicom.h
briq_panel.c Revert "[POWERPC] Rename get_property to of_get_property: drivers" 2007-04-26 22:24:31 +10:00
cd1865.h
consolemap.c
cp437.uni
cs5535_gpio.c
cyclades.c
decserial.c
defkeymap.c_shipped
defkeymap.map
digi.h
digi1.h
digiFep1.h
digiPCI.h
ds1286.c
ds1302.c
ds1620.c
dsp56k.c
dtlk.c
ec3104_keyb.c
efirtc.c
epca.c
epca.h
epcaconfig.h
esp.c
generic_nvram.c
generic_serial.c
genrtc.c
hangcheck-timer.c
hpet.c
hvc_beat.c
hvc_console.c [POWERPC] hvc_console: Typo fixes 2007-04-24 21:31:46 +10:00
hvc_console.h
hvc_iseries.c [POWERPC] Rename get_property to of_get_property: partial drivers 2007-04-27 15:51:56 +10:00
hvc_rtas.c
hvc_vio.c [POWERPC] Rename get_property to of_get_property: partial drivers 2007-04-27 15:51:56 +10:00
hvcs.c
hvsi.c [POWERPC] Rename get_property to of_get_property: partial drivers 2007-04-27 15:51:56 +10:00
i8k.c
ip27-rtc.c
isicom.c
istallion.c
keyboard.c Input: keyboard handler - use printk_ratelimit() 2007-04-12 01:30:52 -04:00
lcd.c
lcd.h
lp.c
mbcs.c
mbcs.h
mem.c fix bogon in /dev/mem mmap'ing on nommu 2007-04-17 16:36:27 -07:00
misc.c
mmtimer.c
moxa.c
mspec.c
mxser.c Char: mxser, fix TIOCMIWAIT 2007-04-24 08:23:08 -07:00
mxser.h
mxser_new.c Char: mxser_new, fix TIOCMIWAIT 2007-04-24 08:23:07 -07:00
mxser_new.h
n_hdlc.c
n_r3964.c
n_tty.c
nsc_gpio.c
nvram.c
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
ppdev.c
pty.c
random.c [NET]: random functions can use nsec resolution instead of usec 2007-04-25 22:28:25 -07:00
raw.c
riscom8.c
riscom8.h
riscom8_reg.h
rocket.c
rocket.h
rocket_int.h
rtc.c
scc.h
scx200_gpio.c
selection.c
ser_a2232.c
ser_a2232.h
ser_a2232fw.ax
ser_a2232fw.h
serial167.c
snsc.c
snsc.h
snsc_event.c
sonypi.c sonypi: use mutex instead of semaphore 2007-04-28 22:13:34 -04:00
specialix.c
specialix_io8.h
stallion.c
sx.c
sx.h
sxboards.h
sxwindow.h
synclink.c
synclink_gt.c
synclinkmp.c
sysrq.c
tb0219.c
tipar.c
tlclk.c
toshiba.c
tty_io.c tty_register_driver: only allocate tty instances when defined 2007-05-07 12:12:53 -07:00
tty_ioctl.c
vc_screen.c
viocons.c
viotape.c
vme_scc.c
vr41xx_giu.c
vt.c
vt_ioctl.c