From: Dan Carpenter Date: Wed, 4 May 2016 06:19:54 +0000 (+0300) Subject: iwlwifi: mvm: silence uninitialized variable warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=32afd15b0f56eb9adf107fb52c6b76c308f5966c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git iwlwifi: mvm: silence uninitialized variable warning "max_amsdu_len" isn't set if kstrtouint() fails. Signed-off-by: Dan Carpenter Signed-off-by: Luca Coelho --- diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c index 406cf1cb945c..b34489817c70 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;