Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfe417bc authored by Johannes Berg's avatar Johannes Berg Committed by Luciano Coelho
Browse files

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: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
parent cf8c3cff
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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));
}