Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6965a354 authored by Luciano Coelho's avatar Luciano Coelho Committed by Johannes Berg
Browse files

iwlwifi: pcie: don't swallow error codes in iwl_trans_pcie_alloc()



The iwl_trans_pcie_alloc() function doesn't pass up error codes
returned from functions it calls, swallowing them and returning NULL
in all failure cases.  The caller checks if the return value is NULL
and returns -ENOMEM.  This is not correct, because in certain cases
the failure was not due to an OOM situation.

To fix this, modify the iwl_trans_pcie_alloc() function to use
ERR_PTR() to return error codes and clean up the error handling code
a bit.

Signed-off-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent f8f03c3e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment