summaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2016-01-24 12:36:06 +0000
committerJonas Gorski <jogo@openwrt.org>2016-01-24 12:36:06 +0000
commita9b4952be143b67c929066fc67fc50d8fe5f64b5 (patch)
treeb739c34a44b85daae56cab13e940f457e6b370ba /target/linux/generic/files
parent38719ecca4cb1c120e8122495a676fe7c0bd66ce (diff)
downloadmaster-31e0f0ae-a9b4952be143b67c929066fc67fc50d8fe5f64b5.tar.gz
master-31e0f0ae-a9b4952be143b67c929066fc67fc50d8fe5f64b5.tar.bz2
master-31e0f0ae-a9b4952be143b67c929066fc67fc50d8fe5f64b5.zip
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 <jogo@openwrt.org> SVN-Revision: 48472
Diffstat (limited to 'target/linux/generic/files')
-rw-r--r--target/linux/generic/files/drivers/net/phy/swconfig.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c
index a47af3c0c6..4bfe64fbd0 100644
--- a/target/linux/generic/files/drivers/net/phy/swconfig.c
+++ b/target/linux/generic/files/drivers/net/phy/swconfig.c
@@ -1172,14 +1172,9 @@ EXPORT_SYMBOL_GPL(unregister_switch);
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