diff options
author | Haim Dreyfuss <[email protected]> | 2021-02-10 14:29:22 +0200 |
---|---|---|
committer | Luca Coelho <[email protected]> | 2021-02-10 14:39:41 +0200 |
commit | 55ae96b6acf0cacf2b33a1b5c206686a825da6d8 (patch) | |
tree | 8270da21fe29d612e69e1c257abf4c03cf758bea /lib/mpi/mpi-mod.c | |
parent | 9cd3de8106a87f892e76d3ef2add1ec194b96ae8 (diff) |
iwlwifi: acpi: don't return valid pointer as an ERR_PTR
iwl_acpi_get_wifi_pkg() may return a valid pointer (meaning success),
while `tbl_rev` is invalid (equel to 1).
In this case, we will treat that as an error.
Subsequent "users" of this "error code" may either check for nonzero
(good; pointers are never zero) or negative
(bad; pointers may be "positive") fix that by splitting the if statement.
First check if IS_ERR(wifi_pkg) and then if tbl_rev != 0.
Signed-off-by: Haim Dreyfuss <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
Link: https://lore.kernel.org/r/iwlwifi.20210210142629.1c8c4b58c932.I147373f6fd364606b0282af8d402c722eb917225@changeid
Signed-off-by: Luca Coelho <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions