linux/drivers/char
Julia Lawall e045907c0a drivers/char/tlclk.c: fix error return code
Convert a 0 error return code to a negative one, as returned elsewhere in the
function.

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

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

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

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Mark Gross <mark.gross@intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-16 10:09:15 -07:00
..
agp agp/intel-agp: remove snb+ host bridge pciids 2012-06-25 21:10:35 +02:00
hw_random Virtio patches, mainly hotplugging fixes. 2012-07-30 13:24:37 -07:00
ipmi char/ipmi: remove local ioctl defines replaced by generic ones 2012-07-23 12:48:04 +02:00
mwave
pcmcia
tpm Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2012-07-23 18:49:06 -07:00
xilinx_hwicap
apm-emulation.c
applicom.c
applicom.h
bfin-otp.c
bsr.c powerpc/BSR: cleanup the error path of bsr_init 2012-07-17 10:27:38 -07:00
ds1302.c
ds1620.c
dsp56k.c
dtlk.c
efirtc.c
generic_nvram.c
genrtc.c
hangcheck-timer.c
hpet.c
i8k.c
Kconfig
lp.c
Makefile
mbcs.c
mbcs.h
mem.c powerpc: Disable /dev/port interface on systems without an ISA bridge 2012-07-11 18:22:32 +10:00
misc.c
mmtimer.c
msm_smd_pkt.c
mspec.c [IA64] Redefine ATOMIC_INIT and ATOMIC64_INIT to drop the casts 2012-07-26 10:55:26 -07:00
nsc_gpio.c
nvram.c
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
ppdev.c
ps3flash.c
random.c random: mix in architectural randomness in extract_buf() 2012-07-27 22:37:20 -04:00
raw.c
rtc.c
scx200_gpio.c
snsc_event.c
snsc.c
snsc.h
sonypi.c sonypi: Use struct dev_pm_ops for power management 2012-07-01 13:31:14 +02:00
tb0219.c
tile-srom.c
tlclk.c drivers/char/tlclk.c: fix error return code 2012-08-16 10:09:15 -07:00
toshiba.c
ttyprintk.c
uv_mmtimer.c
virtio_console.c