linux/drivers/usb/gadget
Julia Lawall 20e7d4653d usb: gadget: fix error return code
Convert a zero return value on error 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 e1,e2;
@@
(
if (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-08-19 09:24:33 -05:00
..
function Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-08-06 09:38:14 -07:00
legacy usb: dbgp gadget: fix use after free in dbgp_unbind() 2014-08-19 09:21:46 -05:00
udc usb: gadget: fix error return code 2014-08-19 09:24:33 -05:00
composite.c usb: gadget: composite: dequeue cdev->req before free it in composite_dev_cleanup 2014-07-16 10:05:01 -05:00
config.c
configfs.c usb: patches for v3.17 merge window 2014-07-21 11:33:41 -07:00
configfs.h usb: gadget: OS descriptors: provide interface directory names 2014-06-19 10:06:48 -05:00
epautoconf.c
functions.c
Kconfig usb: gadget: Gadget directory cleanup - group UDC drivers 2014-07-16 12:15:28 -05:00
Makefile usb: gadget: Gadget directory cleanup - group usb functions 2014-07-16 12:50:36 -05:00
u_f.c
u_f.h usb: gadget: FunctionFS: share VLA macros with all usb gadget files 2014-05-14 09:37:27 -05:00
u_os_desc.h usb: gadget: u_os_desc: helper functions for accessing ext prop buffer 2014-07-10 08:36:51 -05:00
usbstring.c