Author: jogo
Date: 2016-01-24 13:36:06 +0100 (Sun, 24 Jan 2016)
New Revision: 48472

Modified:
   trunk/target/linux/generic/files/drivers/net/phy/swconfig.c
Log:
swconfig: simplify init code

Directly return the return value of genl_register_family_with_ops()
instead of storing it in a temporary variable, then returning it.

Signed-off-by: Jonas Gorski <[email protected]>

Modified: trunk/target/linux/generic/files/drivers/net/phy/swconfig.c
===================================================================
--- trunk/target/linux/generic/files/drivers/net/phy/swconfig.c 2016-01-24 
12:35:59 UTC (rev 48471)
+++ trunk/target/linux/generic/files/drivers/net/phy/swconfig.c 2016-01-24 
12:36:06 UTC (rev 48472)
@@ -1172,14 +1172,9 @@
 static int __init
 swconfig_init(void)
 {
-       int err;
-
        INIT_LIST_HEAD(&swdevs);
        
-       err = genl_register_family_with_ops(&switch_fam, swconfig_ops);
-       if (err)
-               return err;
-       return 0;
+       return genl_register_family_with_ops(&switch_fam, swconfig_ops);
 }
 
 static void __exit
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to