From a9b4952be143b67c929066fc67fc50d8fe5f64b5 Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Sun, 24 Jan 2016 12:36:06 +0000 Subject: 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 SVN-Revision: 48472 --- target/linux/generic/files/drivers/net/phy/swconfig.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'target/linux') diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c index a47af3c..4bfe64f 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 -- cgit v1.1