summaryrefslogtreecommitdiffstats
path: root/net/6lowpan/core.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-14 09:14:23 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-21 15:46:32 +0200
commit6987738dfa4cdd8ef68149c2fe644d9c20397d76 (patch)
tree3ad653300f70e7419169b654b6761c6c9d3c20d5 /net/6lowpan/core.c
parent8bff68b80964134085a2f58642f22f6ea1b54857 (diff)
downloadlinux-6987738dfa4cdd8ef68149c2fe644d9c20397d76.tar.gz
linux-6987738dfa4cdd8ef68149c2fe644d9c20397d76.tar.bz2
linux-6987738dfa4cdd8ef68149c2fe644d9c20397d76.zip
6lowpan: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Because we don't care if debugfs works or not, this trickles back a bit so we can clean things up by making some functions return void instead of an error value that is never going to fail. Cc: Alexander Aring <alex.aring@gmail.com> Cc: Jukka Rissanen <jukka.rissanen@linux.intel.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: linux-bluetooth@vger.kernel.org Cc: linux-wpan@vger.kernel.org Cc: netdev@vger.kernel.org Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/6lowpan/core.c')
-rw-r--r--net/6lowpan/core.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/6lowpan/core.c b/net/6lowpan/core.c
index 2d68351f1ac4..a068757eabaf 100644
--- a/net/6lowpan/core.c
+++ b/net/6lowpan/core.c
@@ -42,9 +42,7 @@ int lowpan_register_netdevice(struct net_device *dev,
if (ret < 0)
return ret;
- ret = lowpan_dev_debugfs_init(dev);
- if (ret < 0)
- unregister_netdevice(dev);
+ lowpan_dev_debugfs_init(dev);
return ret;
}
@@ -152,9 +150,7 @@ static int __init lowpan_module_init(void)
{
int ret;
- ret = lowpan_debugfs_init();
- if (ret < 0)
- return ret;
+ lowpan_debugfs_init();
ret = register_netdevice_notifier(&lowpan_notifier);
if (ret < 0) {