iwlwifi: mvm: fix NVM parsing error path
authorJohannes Berg <johannes.berg@intel.com>
Mon, 13 May 2013 19:44:42 +0000 (21:44 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 16 May 2013 21:13:45 +0000 (23:13 +0200)
commit82598b4f43312c01b976e02add9a5205e371f858
tree8f53438636d20c71269932d115e493ecc6ef301f
parentbf0fd5da8afdea8e1b1a2b42b8e9db068fbac96b
iwlwifi: mvm: fix NVM parsing error path

If NVM parsing fails and returns NULL, we continue in
the code flow and eventually crash accessing the NULL
pointer. Return an error from iwl_nvm_init() if the
parsing failed.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/iwlwifi/mvm/nvm.c