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: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>