iwlwifi: protect SRAM debugfs
authorJohannes Berg <johannes.berg@intel.com>
Thu, 27 Feb 2014 01:52:56 +0000 (09:52 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Mar 2014 23:10:09 +0000 (16:10 -0700)
commit8234281aea5f98e5216a01d4955ce44025e95212
tree59c272acf46abd242dae6a40a9827072532a0d12
parent3ece09975ce21d9aa9a64d34d7f1f6ea179e8b4d
iwlwifi: protect SRAM debugfs

commit 4fc79db178f0a0ede479b4713e00df2d106028b3 upstream.

If the device is not started, we can't read its
SRAM and attempting to do so will cause issues.
Protect the debugfs read.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
[wujg: Backported to 3.4: adjust context]
Signed-off-by: Jianguo Wu <wujianguo@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/iwlwifi/iwl-debugfs.c