linux/drivers/staging/tidspbridge
Julia Lawall cc58cbb885 staging: tidspbridge: Clean up error-handling code
In the first hunk, 0 is returned on memory allocation failure, even though
other failures return -ENOMEM or other similar values.

In the second hunk, there was error handling code that returned without
freeing psz_path_name.

A simplified version of the semantic match that finds the first 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:44:25 -07:00
..
core staging: tidspbridge: fix signess error 2010-10-10 11:25:00 -07:00
Documentation staging: ti dspbridge: remove contributor leftovers 2010-07-08 13:31:45 -07:00
dynload staging:ti dspbridge: remove unnecessary volatile variables 2010-07-28 08:22:04 -07:00
gen staging: tidspbridge: remove duplicated include 2010-10-05 11:42:20 -07:00
include/dspbridge staging: tidspbridge - remove dmm custom module 2010-10-05 15:30:59 -07:00
pmgr staging: tidspbridge: Clean up error-handling code 2010-10-15 12:44:25 -07:00
rmgr staging: tidspbridge: bind driver name to device name 2010-10-07 10:09:49 -07:00
Kconfig staging: tidspbridge - update Kconfig to select IOMMU module 2010-10-05 18:36:39 -07:00
Makefile Staging: tidspbridge: Makefile: replace the use of <module>-objs with <module>-y 2010-10-08 07:23:40 -07:00
TODO staging: tidspbridge: add memory consistency to TODO list 2010-10-09 13:49:41 -07:00