]> git.hungrycats.org Git - linux/commit
wifi: iwlwifi: mvm: handle debugfs names more carefully
authorJohannes Berg <johannes.berg@intel.com>
Wed, 20 Mar 2024 21:26:32 +0000 (23:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:11:49 +0000 (15:11 +0200)
commit0c5e6e70b37bf19ee01ebf167ab4846bf64f8411
tree1a3a0be5aa2605e8ecd349ab01cf852d931ee2b2
parentb0ddaf962a4131fb5abe0db6e1a358b1185fc32d
wifi: iwlwifi: mvm: handle debugfs names more carefully

commit 19d82bdedaf2db0bfb3762dda714ea803065eed5 upstream.

With debugfs=off, we can get here with the dbgfs_dir being
an ERR_PTR(). Instead of checking for all this, which is
often flagged as a mistake, simply handle the names here
more carefully by printing them, then we don't need extra
checks.

Also, while checking, I noticed theoretically 'buf' is too
small, so fix that size as well.

Cc: stable@vger.kernel.org
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218422
Fixes: c36235acb34f ("wifi: iwlwifi: mvm: rework debugfs handling")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240320232419.4dc1eb3dd015.I32f308b0356ef5bcf8d188dd98ce9b210e3ab9fd@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c