iwlwifi: tt: move ucode_loaded check under mutex
authorJohannes Berg <johannes.berg@intel.com>
Wed, 22 Mar 2017 21:00:10 +0000 (22:00 +0100)
committerLuca Coelho <luciano.coelho@intel.com>
Mon, 5 Jun 2017 18:47:07 +0000 (21:47 +0300)
commitd9954405758a0cbbe258d9b4d4dc12a06fa48a28
tree8b3d36bdfa53d54807a02a5dac894bb8b172e358
parentee48b72211f844a58a06819e9ccceee6acf04b2d
iwlwifi: tt: move ucode_loaded check under mutex

The ucode_loaded check should be under the mutex, since it can
otherwise change state after we looked at it and before we got
the mutex. Fix that.

Fixes: 5c89e7bc557e ("iwlwifi: mvm: add registration to cooling device")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/tt.c