mac80211: check for allocation failure in debugfs code
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 7 Feb 2017 13:20:53 +0000 (16:20 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 8 Feb 2017 09:05:07 +0000 (10:05 +0100)
commitb2347a322d1f6f93f1a39fe17ed08628fc959351
tree6276bbd2af92b53346aa7e50871fe8069ad591e9
parent26717828b75dd5c46e97f7f4a9b937d038bb2852
mac80211: check for allocation failure in debugfs code

kmalloc() can fail.  Also let's move the allocation out of the
declaration block so it's easier to read.

Fixes: 4a5eccaa9350 ("mac80211: Show pending txqlen in debugfs.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/debugfs.c