summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-08-26 12:22:12 +0200
committerLuciano Coelho <luciano.coelho@intel.com>2015-08-28 13:26:35 +0300
commitcfe417bc47ba8f470941a1b8ad60911e163f1b34 (patch)
treee26ac6578589499ef8a75f34a88cb26f2c40a616
parentcf8c3cff3fcce966c6d31001c09c92778f961eea (diff)
downloadlwn-cfe417bc47ba8f470941a1b8ad60911e163f1b34.tar.gz
lwn-cfe417bc47ba8f470941a1b8ad60911e163f1b34.zip
iwlwifi: mvm: don't NUL-terminate low-latency debugfs file
There's obviously no reason to write a NUL-terminating byte into the debugfs file. Apparently nobody tried to use this from a tool that doesn't strip NUL bytes though, so we never noticed. Fix it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c b/drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c
index 383a3162046c..334ae56e5d8b 100644
--- a/drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c
+++ b/drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c
@@ -1250,11 +1250,10 @@ static ssize_t iwl_dbgfs_low_latency_read(struct file *file,
{
struct ieee80211_vif *vif = file->private_data;
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
- char buf[3];
+ char buf[2];
buf[0] = mvmvif->low_latency ? '1' : '0';
buf[1] = '\n';
- buf[2] = '\0';
return simple_read_from_buffer(user_buf, count, ppos, buf, sizeof(buf));
}