linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] iwlwifi: mvm: silence unintialized variable warning
@ 2016-05-04  6:19 Dan Carpenter
  2016-05-09 11:45 ` Coelho, Luciano
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-05-04  6:19 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Emmanuel Grumbach, Intel Linux Wireless, Kalle Valo, Sara Sharon,
	Luca Coelho, Golan Ben-Ami, Moshe Harel, linux-wireless,
	kernel-janitors

"max_amsdu_len" isn't set if kstrtouint() fails.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
index 362a546..cb8db23 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
@@ -1020,6 +1020,8 @@ static ssize_t iwl_dbgfs_max_amsdu_len_write(struct iwl_mvm *mvm,
 	int ret;
 
 	ret = kstrtouint(buf, 0, &max_amsdu_len);
+	if (ret)
+		return ret;
 
 	if (max_amsdu_len > IEEE80211_MAX_MPDU_LEN_VHT_11454)
 		return -EINVAL;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-09 11:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-04  6:19 [patch] iwlwifi: mvm: silence unintialized variable warning Dan Carpenter
2016-05-09 11:45 ` Coelho, Luciano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).