diff options
author | Elizabeth Ferdman <gnudevliz@gmail.com> | 2016-10-11 19:29:20 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-16 10:26:19 +0200 |
commit | be704e58328d4c488677c59e04dd9cec2d9515a2 (patch) | |
tree | 4d8930bb487d8226512c7a90ada4eaa008b5c7ef /drivers/staging/sm750fb | |
parent | efe9bc08bf479b1baacc63554042c5dd11fecd9e (diff) |
staging: sm750fb: compress return logic
Using Coccinelle script, compress return logic to return a value
directly rather than doing an assignment and returning the variable.
Remove unnecessary variable declaration by hand.
Coccinelle script:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Elizabeth Ferdman <gnudevliz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/sm750fb')
-rw-r--r-- | drivers/staging/sm750fb/sm750.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index 8770a46c3c67..b094492cc5f0 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -1209,7 +1209,6 @@ static struct pci_driver lynxfb_driver = { static int __init lynxfb_init(void) { char *option; - int ret; #ifdef MODULE option = g_option; @@ -1219,8 +1218,7 @@ static int __init lynxfb_init(void) #endif lynxfb_setup(option); - ret = pci_register_driver(&lynxfb_driver); - return ret; + return pci_register_driver(&lynxfb_driver); } module_init(lynxfb_init); |