Skip to content

Commit 71bc033

Browse files
committed
iwlwifi: check allocated pointer when allocating conf_tlvs
We were erroneously checking the length of the tlv instead of checking the pointer returned by kmemdup() when allocating dbg_conf_tlv[]. This was probably a typo. Fix it by checking the returned pointer instead of the length. Reported-by: Markus Elfring <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Link: https://lore.kernel.org/r/iwlwifi.20200306151128.06e00e6e980f.I9a890ce83493b79892a5f690d12016525317fa7e@changeid
1 parent cb377df commit 71bc033

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/wireless/intel/iwlwifi/iwl-drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,7 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
14671467
kmemdup(pieces->dbg_conf_tlv[i],
14681468
pieces->dbg_conf_tlv_len[i],
14691469
GFP_KERNEL);
1470-
if (!pieces->dbg_conf_tlv_len[i])
1470+
if (!pieces->dbg_conf_tlv[i])
14711471
goto out_free_fw;
14721472
}
14731473
}

0 commit comments

Comments
 (0)