]> 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)
commit1d11706efd78636702c2ae7d7bda541bb6f437ea
treee848c28efad253875f33d4f3d28361125d9e2bd2
parentaaf78258c1274872780e5a137c0479c6728b8ee0
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