OSDN Git Service

usb: misc: ftdi-elan: compress return logic into one line
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Mon, 10 Jul 2017 03:22:46 +0000 (22:22 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Jul 2017 11:13:44 +0000 (13:13 +0200)
commit020e03b78312ab0df1fd3c4ea62e675724cd18cf
treef9ca2feccb6b481baf1ec1e4daa3af05883dc700
parente6f9e13b62bad739a9fc095e061dc9fc8cf4168c
usb: misc: ftdi-elan: compress return logic into one line

Simplify return logic to avoid unnecessary variable declaration
and assignment.

This issue was detected using Coccinelle and the following
semantic patch:

@@
local idexpression ret;
expression e;
@@

-ret =
+return
     e;
-return ret;

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/ftdi-elan.c