OSDN Git Service

staging: dgnc: return error code directly
authorTobin C. Harding <me@tobin.cc>
Mon, 13 Mar 2017 01:37:32 +0000 (12:37 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Mar 2017 22:27:31 +0000 (06:27 +0800)
commit93cf5f43421513ee6c07da68903221003a490f11
tree66eee3e62a4c00def4297906b3c79684d4465976
parentcb52fce16027d79a97d0870a1110d4a4493fa0a8
staging: dgnc: return error code directly

In various functions a return code variable is defined at the top of
function, for example;

rc = -ENODEV;

and then the variable is returned. This makes it harder to read since
it separates the error code from the return site.

Return the error code directly instead of using a variable.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgnc/dgnc_tty.c