]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
mac80211: no need to check return value of debugfs_create functions
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Jun 2019 06:59:34 +0000 (08:59 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 14 Jun 2019 14:08:28 +0000 (16:08 +0200)
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.

Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/debugfs_key.c
net/mac80211/debugfs_netdev.c
net/mac80211/debugfs_sta.c

index a2ef95f16f116ae905049c595742bcee3e78c6c7..1a25de4e7e78fc1e239e5a3807c4cc63b7915147 100644 (file)
@@ -342,9 +342,6 @@ void ieee80211_debugfs_key_add(struct ieee80211_key *key)
        key->debugfs.dir = debugfs_create_dir(buf,
                                        key->local->debugfs.keys);
 
-       if (!key->debugfs.dir)
-               return;
-
        sta = key->sta;
        if (sta) {
                sprintf(buf, "../../netdev:%s/stations/%pM",
index deb3faf08337288b2c746be8a2863b38f6d168c7..f6508cf67944383eb93619996edf703428565fbb 100644 (file)
@@ -818,9 +818,8 @@ void ieee80211_debugfs_add_netdev(struct ieee80211_sub_if_data *sdata)
        sprintf(buf, "netdev:%s", sdata->name);
        sdata->vif.debugfs_dir = debugfs_create_dir(buf,
                sdata->local->hw.wiphy->debugfsdir);
-       if (sdata->vif.debugfs_dir)
-               sdata->debugfs.subdir_stations = debugfs_create_dir("stations",
-                       sdata->vif.debugfs_dir);
+       sdata->debugfs.subdir_stations = debugfs_create_dir("stations",
+                                                       sdata->vif.debugfs_dir);
        add_files(sdata);
 }
 
@@ -845,8 +844,5 @@ void ieee80211_debugfs_rename_netdev(struct ieee80211_sub_if_data *sdata)
                return;
 
        sprintf(buf, "netdev:%s", sdata->name);
-       if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf))
-               sdata_err(sdata,
-                         "debugfs: failed to rename debugfs dir to %s\n",
-                         buf);
+       debugfs_rename(dir->d_parent, dir, dir->d_parent, buf);
 }
index 8e921281e0d5f145d55391c8df01a0262201e89a..b2542bb2814e52c46530525a67ebab0ef6b4c6fb 100644 (file)
@@ -960,8 +960,6 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta)
         * dir might still be around.
         */
        sta->debugfs_dir = debugfs_create_dir(mac, stations_dir);
-       if (!sta->debugfs_dir)
-               return;
 
        DEBUGFS_ADD(flags);
        DEBUGFS_ADD(aid);