linux_dsm_epyc7002/drivers/serial
Julia Lawall 6cc0cc4a35 SERIAL: ioc3_serial: Return -ENOMEM on memory allocation failure
In this code, 0 is returned on memory allocation failure, even though other
failures return -ENOMEM or other similar values.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression ret;
expression x,e1,e2,e3;
@@

ret = 0
... when != ret = e1
*x = \(kmalloc\|kcalloc\|kzalloc\)(...)
... when != ret = e2
if (x == NULL) { ... when != ret = e3
  return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
To: Pat Gefre <pfg@sgi.com>
Cc: kernel-janitors@vger.kernel.org
Cc: linux-ia64@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/1704/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-10-19 18:32:40 +01:00
..
cpm_uart
jsm
8250_accent.c
8250_acorn.c
8250_boca.c
8250_early.c serial: print early console device address in hex 2010-08-23 18:17:20 -07:00
8250_exar_st16c554.c
8250_fourport.c
8250_gsc.c
8250_hp300.c
8250_hub6.c
8250_mca.c
8250_pci.c
8250_pnp.c
8250.c
8250.h
21285.c
68328serial.c 68328serial: check return value of copy_*_user() instead of access_ok() 2010-08-23 18:17:22 -07:00
68328serial.h
68360serial.c
altera_jtaguart.c
altera_uart.c
amba-pl010.c serial: amba-pl010: fix set_ldisc 2010-09-20 16:30:00 -07:00
amba-pl011.c
apbuart.c
apbuart.h
atmel_serial.c
bcm63xx_uart.c
bfin_5xx.c
bfin_sport_uart.c serial: bfin_sport_uart: restore transmit frame sync fix 2010-09-03 17:29:04 -07:00
bfin_sport_uart.h
clps711x.c
crisv10.c
crisv10.h
dz.c
dz.h
icom.c
icom.h
imx.c
ioc3_serial.c SERIAL: ioc3_serial: Return -ENOMEM on memory allocation failure 2010-10-19 18:32:40 +01:00
ioc4_serial.c
ip22zilog.c
ip22zilog.h
Kconfig
kgdboc.c
m32r_sio_reg.h
m32r_sio.c
m32r_sio.h
Makefile
max3100.c
max3107-aava.c
max3107.c
max3107.h
mcf.c
mfd.c drivers/serial/mfd.c needs slab.h 2010-10-01 10:50:58 -07:00
mpc52xx_uart.c powerpc/5200: mpc52xx_uart.c: Add of_node_put to avoid memory leak 2010-09-08 13:54:48 -06:00
mpsc.c
mrst_max3110.c drivers/serial/mrst_max3110.c needs linux/irq.h 2010-10-01 10:50:58 -07:00
mrst_max3110.h
msm_serial.c
msm_serial.h
mux.c
netx-serial.c
nwpserial.c
of_serial.c of: Fix missing includes 2010-08-16 23:44:49 -06:00
pmac_zilog.c
pmac_zilog.h
pnx8xxx_uart.c
pxa.c
s3c24a0.c
s3c2400.c
s3c2410.c
s3c2412.c
s3c2440.c
s3c6400.c
s5pv210.c
sa1100.c
samsung.c
samsung.h
sb1250-duart.c
sc26xx.c
serial_core.c
serial_cs.c pcmcia serial_cs.c: fix multifunction card handling 2010-09-15 17:56:32 +02:00
serial_ks8695.c
serial_lh7a40x.c
serial_txx9.c
sh-sci.c
sh-sci.h
sn_console.c Input: sysrq - drop tty argument form handle_sysrq() 2010-08-21 00:34:45 -07:00
suncore.c sparc: Really fix "console=" for serial consoles. 2010-08-16 12:26:09 -07:00
suncore.h
sunhv.c
sunsab.c
sunsab.h
sunsu.c
sunzilog.c
sunzilog.h
timbuart.c
timbuart.h
uartlite.c
ucc_uart.c
vr41xx_siu.c
zs.c
zs.h