]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: fix ACPI table revision checks
authorLuca Coelho <luciano.coelho@intel.com>
Fri, 23 Aug 2019 08:59:09 +0000 (11:59 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 9 Oct 2019 10:01:04 +0000 (13:01 +0300)
commite29dbfba290db7b0bb224609ce1a024d6ab234c2
treee848c28efad253875f33d4f3d28361125d9e2bd2
parent24f15de1dda536fa9c2e3cf3b9ab2be7fda64d5e
iwlwifi: fix ACPI table revision checks

We can't check for the ACPI table revision validity in the same if
where we check if the package was read correctly, because we return
PTR_ERR(pkg) and if the table is not valid but the pointer is, we
would return a valid pointer as an error.  Fix that by moving the
table checks to a separate if and return -EINVAL if it's not valid.

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