Commit be704e58 authored by Elizabeth Ferdman's avatar Elizabeth Ferdman Committed by Greg Kroah-Hartman

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: default avatarElizabeth Ferdman <gnudevliz@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent efe9bc08
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment