linux/drivers/staging/dgnc
Quentin Lambert f6a14cf04f Staging: dgnc: Use goto for error handling
This patch introduces goto statments for error handling
and in cases where a lock needs to be released.

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

@candidates exists@
identifier f, label;
statement s;
position p1, p2, p3;
@@

  f@p1(...) {
  ...when any

    if@p2(...) {
    ...when any
      s

      return@p3 ...;
    }
  ...when any
  }

@good1 exists@
identifier candidates.f, candidates.label;
statement candidates.s;
position candidates.p1, candidates.p2;
@@

  f@p1(...) {
  ...when any

    if(...) {
    ...when any
      s
      return ...;
    }
    ...when any

    if@p2(...) {...}
  ...when any
 }

@depends on good1@
identifier candidates.f, candidates.label;
position candidates.p1, candidates.p3;
@@

   f@p1(...) {
   ...when any
*  return@p3 ...;
  }

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-12 11:13:41 +01:00
..
dgnc_cls.c Staging: dgnc: Use goto for error handling 2015-03-12 11:13:41 +01:00
dgnc_cls.h dgnc: clean up comments at start of files 2015-03-12 11:11:17 +01:00
dgnc_driver.c Staging: dgnc: Use goto for error handling 2015-03-12 11:13:41 +01:00
dgnc_driver.h dgnc: clean up comments at start of files 2015-03-12 11:11:17 +01:00
dgnc_kcompat.h dgnc: clean up comments at start of files 2015-03-12 11:11:17 +01:00
dgnc_mgmt.c dgnc: clean up comments at start of files 2015-03-12 11:11:17 +01:00
dgnc_mgmt.h dgnc: clean up comments at start of files 2015-03-12 11:11:17 +01:00
dgnc_neo.c Staging: dgnc: Use goto for error handling 2015-03-12 11:13:41 +01:00
dgnc_neo.h dgnc: clean up comments at start of files 2015-03-12 11:11:17 +01:00
dgnc_pci.h dgnc: clean up comments at start of files 2015-03-12 11:11:17 +01:00
dgnc_sysfs.c dgnc: clean up comments at start of files 2015-03-12 11:11:17 +01:00
dgnc_sysfs.h dgnc: clean up comments at start of files 2015-03-12 11:11:17 +01:00
dgnc_tty.c dgnc: clean up comments at start of files 2015-03-12 11:11:17 +01:00
dgnc_tty.h dgnc: clean up comments at start of files 2015-03-12 11:11:17 +01:00
dgnc_types.h dgnc: clean up comments at start of files 2015-03-12 11:11:17 +01:00
dgnc_utils.c drivers/staging: use current->state helpers 2015-01-28 11:25:28 -08:00
dgnc_utils.h staging: dgnc: Move utility functions out of dgnc_driver.c 2014-08-16 12:23:13 -07:00
digi.h dgnc: clean up comments at start of files 2015-03-12 11:11:17 +01:00
dpacompat.h dgnc: clean up comments at start of files 2015-03-12 11:11:17 +01:00
Kconfig staging: dgnc: Kconfig: add dependency PCI for it 2013-08-26 06:29:09 -07:00
Makefile dgnc: Move DG_PART definition from Makefile to dgnc_driver.h 2015-03-12 11:05:27 +01:00
TODO Staging: dgnc: Removed trailing whitespace 2015-02-26 13:15:41 -08:00