]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: return -ENOMEM instead of NULL when OOM in iwl_drv_start()
authorLuciano Coelho <luciano.coelho@intel.com>
Tue, 13 Aug 2013 07:34:55 +0000 (10:34 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 16 Aug 2013 10:12:03 +0000 (12:12 +0200)
commitfd78776a1e4d8c6177c5a76389ce6ef46b4ab100
tree1a8fe594ad32769a6d56ea453690a46c30fdd82b
parent2f5765432f53b74b9d908a80b276e54f409be67e
iwlwifi: return -ENOMEM instead of NULL when OOM in iwl_drv_start()

The callers of iwl_drv_start() are probe functions.  If a probe
function returns 0, it means it succeeded.  So if NULL was returned by
iwl_drv_start(), it would be considered as a success.

Fix this by returning -ENOMEM if the driver struct allocation fails in
iwl_drv_start().

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/iwlwifi/iwl-drv.c
drivers/net/wireless/iwlwifi/pcie/drv.c