iwlwifi: mvm: silence uninitialized variable warning
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 4 May 2016 06:19:54 +0000 (09:19 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 5 Jul 2016 21:37:21 +0000 (00:37 +0300)
"max_amsdu_len" isn't set if kstrtouint() fails.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c

index 406cf1c..b344898 100644 (file)
@@ -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;