mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 18:19:02 +00:00
kernel: fix warning in swconfig.c with kernel 3.14
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 40733
This commit is contained in:
parent
f5e5477c81
commit
100e795bcc
@ -1107,7 +1107,10 @@ EXPORT_SYMBOL_GPL(unregister_switch);
|
||||
static int __init
|
||||
swconfig_init(void)
|
||||
{
|
||||
int i, err;
|
||||
int err;
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0))
|
||||
int i;
|
||||
#endif
|
||||
|
||||
INIT_LIST_HEAD(&swdevs);
|
||||
|
||||
@ -1121,16 +1124,17 @@ swconfig_init(void)
|
||||
if (err)
|
||||
goto unregister;
|
||||
}
|
||||
#else
|
||||
err = genl_register_family_with_ops(&switch_fam, swconfig_ops);
|
||||
if (err)
|
||||
return err;
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
unregister:
|
||||
genl_unregister_family(&switch_fam);
|
||||
return err;
|
||||
#else
|
||||
err = genl_register_family_with_ops(&switch_fam, swconfig_ops);
|
||||
if (err)
|
||||
return err;
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void __exit
|
||||
|
Loading…
Reference in New Issue
Block a user