aboutsummaryrefslogtreecommitdiffstats
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
commit714c9d931c8b06547b67a2ac41f30fd045a98801 (patch)
tree35a80fc965f9734b616cb3a15a594f00537d0eea /target/linux/generic/files
parent7041ce8562ca65a5a083b63a8eaabe7806be4d96 (diff)
downloadmaster-187ad058-714c9d931c8b06547b67a2ac41f30fd045a98801.tar.gz
master-187ad058-714c9d931c8b06547b67a2ac41f30fd045a98801.tar.bz2
master-187ad058-714c9d931c8b06547b67a2ac41f30fd045a98801.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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48472 3c298f89-4303-0410-b956-a3cf2f4a3e73
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