linux/drivers/usb/serial
Julia Lawall b0795bbf6d drivers/usb/serial/opticon.c: Release resources on kmalloc failure
Several resources have been allocated before this kmalloc failure, and thus
they should be released in this error handling code, as done in nearby
error handling code.

The semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
local idexpression urb;
statement S;
position p1,p2;
@@

urb = usb_alloc_urb@p1(...);
... when != urb
if (urb == NULL) S
... when != urb
(
return <+...urb...+>;
|
return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

cocci.print_main("",p1)
cocci.print_secs("",p2)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-13 15:51:08 -07:00
..
aircable.c Fix common misspellings 2011-03-31 11:26:23 -03:00
ark3116.c tty: remove filp from the USB tty ioctls 2011-02-17 11:59:14 -08:00
belkin_sa.c tiocmset: kill the file pointer argument 2011-02-17 11:52:43 -08:00
belkin_sa.h USB: belkin_sa.h: checkpatch cleanups 2010-05-20 13:21:46 -07:00
bus.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ch341.c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-03-16 15:11:04 -07:00
ChangeLog.history
console.c usb-console: pass baud from console to the initial tty open 2010-05-20 13:21:32 -07:00
cp210x.c USB: cp210x: fix typo, Telegesys should have been Telegesis 2011-05-10 14:14:58 -07:00
cyberjack.c USB: tty: Prune uses of tty_request_room in the USB layer 2010-03-02 14:55:12 -08:00
cypress_m8.c Fix common misspellings 2011-03-31 11:26:23 -03:00
cypress_m8.h USB: cypress_m8.h: checkpatch cleanups 2010-05-20 13:21:46 -07:00
digi_acceleport.c tiocmset: kill the file pointer argument 2011-02-17 11:52:43 -08:00
empeg.c USB: empeg: reimplement using generic framework 2010-05-20 13:21:48 -07:00
ezusb_convert.pl
ezusb.c
ftdi_sio_ids.h USB: serial: ftdi_sio: adding support for TavIR STK500 2011-04-29 16:45:22 -07:00
ftdi_sio.c USB: serial: ftdi_sio: adding support for TavIR STK500 2011-04-29 16:45:22 -07:00
ftdi_sio.h USB: ftdi_sio: checkpatch cleanups 2010-05-20 13:21:46 -07:00
funsoft.c USB serial: make USB device id constant 2010-03-02 14:54:16 -08:00
garmin_gps.c USB: gamin_gps: Fix for data transfer problems in native mode 2011-04-29 17:03:59 -07:00
generic.c USB: serial: handle Data Carrier Detect changes 2011-01-22 18:53:26 -08:00
hp4x.c USB serial: make USB device id constant 2010-03-02 14:54:16 -08:00
io_16654.h
io_edgeport.c Fix common misspellings 2011-03-31 11:26:23 -03:00
io_edgeport.h Fix common misspellings 2011-03-31 11:26:23 -03:00
io_ionsp.h USB: io_edgeport: checkpatch cleanups 2010-05-20 13:21:47 -07:00
io_tables.h USB serial: add missing .usb_driver field in serial drivers 2011-01-22 18:38:59 -08:00
io_ti.c Fix common misspellings 2011-03-31 11:26:23 -03:00
io_ti.h USB: io_edgeport: checkpatch cleanups 2010-05-20 13:21:47 -07:00
io_usbvend.h USB: io_edgeport: checkpatch cleanups 2010-05-20 13:21:47 -07:00
ipaq.c Revert "USB: Adding support for HTC Smartphones to ipaq" 2010-08-10 14:35:35 -07:00
ipw.c USB: ipw: reimplement using generic framework 2010-05-20 13:21:46 -07:00
ir-usb.c USB: ir-usb: fix incorrect write-buffer length 2010-05-20 13:21:50 -07:00
iuu_phoenix.c tiocmset: kill the file pointer argument 2011-02-17 11:52:43 -08:00
iuu_phoenix.h
Kconfig Revert "USB: sam-ba: add driver for Atmel SAM Boot Assistant (SAM-BA)" 2011-04-13 16:48:25 -07:00
keyspan_pda.c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-03-16 15:11:04 -07:00
keyspan_usa26msg.h
keyspan_usa28msg.h
keyspan_usa49msg.h
keyspan_usa67msg.h
keyspan_usa90msg.h
keyspan.c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-03-16 15:11:04 -07:00
keyspan.h tiocmset: kill the file pointer argument 2011-02-17 11:52:43 -08:00
kl5kusb105.c tiocmset: kill the file pointer argument 2011-02-17 11:52:43 -08:00
kl5kusb105.h USB: kl5kusb105.h: checkpatch cleanups 2010-05-20 13:21:47 -07:00
kobil_sct.c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-03-16 15:11:04 -07:00
kobil_sct.h USB: kobil_sct.h: checkpatch cleanups 2010-05-20 13:21:47 -07:00
Makefile Revert "USB: sam-ba: add driver for Atmel SAM Boot Assistant (SAM-BA)" 2011-04-13 16:48:25 -07:00
Makefile-keyspan_pda_fw
mct_u232.c usb/serial: fix function args warnings, dropping *filp 2011-04-04 08:35:20 -07:00
mct_u232.h Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
mos7720.c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-03-16 15:11:04 -07:00
mos7840.c tty: remove filp from the USB tty ioctls 2011-02-17 11:59:14 -08:00
moto_modem.c USB: moto_modem: Add USB identifier for the Motorola VE240. 2011-04-29 16:45:21 -07:00
navman.c USB: add device IDs for igotu to navman 2010-08-23 20:50:15 -07:00
omninet.c drivers/usb: Remove unnecessary return's from void functions 2010-08-10 14:25:42 +02:00
opticon.c drivers/usb/serial/opticon.c: Release resources on kmalloc failure 2011-05-13 15:51:08 -07:00
option.c Bind only modem AT command endpoint to option module. 2011-04-29 17:05:06 -07:00
oti6858.c tty: remove filp from the USB tty ioctls 2011-02-17 11:59:14 -08:00
oti6858.h
pl2303.c tty: remove filp from the USB tty ioctls 2011-02-17 11:59:14 -08:00
pl2303.h drivers: update to pl2303 usb-serial to support Motorola cables 2011-01-22 18:44:38 -08:00
qcaux.c USB serial: add missing .usb_driver field in serial drivers 2011-01-22 18:38:59 -08:00
qcserial.c usb: qcserial add missing errorpath kfrees 2011-04-13 15:53:16 -07:00
safe_serial.c USB: safe_serial: straighten out read processing 2010-05-20 13:21:49 -07:00
siemens_mpi.c USB serial: add missing .usb_driver field in serial drivers 2011-01-22 18:38:59 -08:00
sierra.c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-03-16 15:11:04 -07:00
spcp8x5.c tty: remove filp from the USB tty ioctls 2011-02-17 11:59:14 -08:00
ssu100.c tty: remove filp from the USB tty ioctls 2011-02-17 11:59:14 -08:00
symbolserial.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ti_usb_3410_5052.c Merge 2.6.38-rc6 into tty-next 2011-02-24 11:36:31 -08:00
ti_usb_3410_5052.h USB: ti_usb_3410_5052: adding multitech dialup fax/modem devices 2010-04-22 15:18:20 -07:00
usb_debug.c USB serial: add missing .usb_driver field in serial drivers 2011-01-22 18:38:59 -08:00
usb_wwan.c usb: wwan: fix compilation without CONFIG_PM_RUNTIME 2011-03-23 13:16:06 -07:00
usb-serial.c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-03-16 15:11:04 -07:00
usb-wwan.h tty: remove filp from the USB tty ioctls 2011-02-17 11:59:14 -08:00
visor.c USB: Add Samsung SGH-I500/Android modem ID switch to visor driver 2011-02-17 10:30:23 -08:00
visor.h USB: visor.h: checkpatch cleanups 2010-05-20 13:21:47 -07:00
vivopay-serial.c USB: serial: Add support for ViVOtech ViVOpay devices. 2010-03-02 14:54:57 -08:00
whiteheat.c tty: remove filp from the USB tty ioctls 2011-02-17 11:59:14 -08:00
whiteheat.h
zio.c USB Serial Driver: ZIO Motherboard 2010-05-20 13:21:32 -07:00