iwlwifi: pcie: don't swallow error codes in iwl_trans_pcie_alloc()
authorLuciano Coelho <luciano.coelho@intel.com>
Sat, 10 Aug 2013 13:35:45 +0000 (16:35 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 12 Aug 2013 13:20:29 +0000 (15:20 +0200)
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>

No differences found