TODO file contains task to verify and correct function return
sites. Need to check for and implement correct usage of goto's when
there is work to be done before returning. 

Patch series is broken up by file to ease review. Perhaps a single
patch would have been more appropriate. Changes to dgnc_mgmt are more
stylistic than all other changes. Perhaps if review ok's those
changes patch set could be rolled into one patch. Happy to do so if
deemed appropriate.

In order to make all return sites uniform the following format was
chosen

1. Use variable name 'rc' throughout.

2. No space after function call when checking return value

    rc = fn(foo);
    if (rc)
       return rc;

3. If multiple returns occur at start of function with same error
code, define and declare rc in single statement and return rc

      int rc = -ENOMEM;
      ...
      if (conditional)
         return rc;
      ...
      if (other-conditional)
         return rc;
      ...


Tobin C. Harding (4):
  staging: dgnc: audit goto's in dgnc_driver
  staging: dgnc: audit goto's in dgnc_mgmt
  staging: dgnc: audit goto's in dgnc_tty
  staging: dgnc: remove item from TODO list

 drivers/staging/dgnc/TODO          |   1 -
 drivers/staging/dgnc/dgnc_driver.c |  27 ++---
 drivers/staging/dgnc/dgnc_mgmt.c   |  37 ++++---
 drivers/staging/dgnc/dgnc_tty.c    | 219 +++++++++++++++++++------------------
 4 files changed, 139 insertions(+), 145 deletions(-)

-- 
2.7.4

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to