linux/drivers/usb/wusbcore
Julia Lawall fd4d72cb0d drivers/usb/wusbcore/wa-hc.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.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-15 15:17:40 -07:00
..
cbaf.c USB: convert drivers/usb/* to use module_usb_driver() 2011-11-18 09:34:02 -08:00
crypto.c Fix common misspellings 2011-03-31 11:26:23 -03:00
dev-sysfs.c
devconnect.c usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed 2011-10-31 19:31:25 -04:00
Kconfig uwb & wusb: fix kconfig error 2012-01-26 11:22:42 -08:00
Makefile usb: makefile cleanup 2010-10-22 10:22:07 -07:00
mmc.c usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed 2011-10-31 19:31:25 -04:00
pal.c
reservation.c Fix common misspellings 2011-03-31 11:26:23 -03:00
rh.c usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed 2011-10-31 19:31:25 -04:00
security.c wusb: Fix potential memory leak in wusb_dev_sec_add() 2012-08-10 12:06:38 -07:00
wa-hc.c drivers/usb/wusbcore/wa-hc.c: fix error return code 2012-08-15 15:17:40 -07:00
wa-hc.h
wa-nep.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
wa-rpipe.c usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed 2011-10-31 19:31:25 -04:00
wa-xfer.c usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed 2011-10-31 19:31:25 -04:00
wusbhc.c wusb: fix find_first_zero_bit() return value check 2011-03-02 19:52:28 -05:00
wusbhc.h Fix common misspellings 2011-03-31 11:26:23 -03:00