]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: check allocated pointer when allocating conf_tlvs
authorLuca Coelho <luciano.coelho@intel.com>
Fri, 6 Mar 2020 13:16:23 +0000 (15:16 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 6 Mar 2020 13:26:32 +0000 (15:26 +0200)
commita31c8943c40092b8d66727b60257126ec29d3985
tree6f7e82e53d3b54283db451758391a8770be66499
parent85f3202acf05d26bd45ab53db9cab22256914e02
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 <Markus.Elfring@web.de>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200306151128.06e00e6e980f.I9a890ce83493b79892a5f690d12016525317fa7e@changeid
drivers/net/wireless/intel/iwlwifi/iwl-drv.c