diff options
Diffstat (limited to 'net/wireless/core.c')
| -rw-r--r-- | net/wireless/core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index febc33bc9c09..cfc5fc5f9e75 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
| @@ -184,6 +184,9 @@ struct wiphy *wiphy_new(struct cfg80211_ops *ops, int sizeof_priv) | |||
| 184 | struct cfg80211_registered_device *drv; | 184 | struct cfg80211_registered_device *drv; |
| 185 | int alloc_size; | 185 | int alloc_size; |
| 186 | 186 | ||
| 187 | WARN_ON(!ops->add_key && ops->del_key); | ||
| 188 | WARN_ON(ops->add_key && !ops->del_key); | ||
| 189 | |||
| 187 | alloc_size = sizeof(*drv) + sizeof_priv; | 190 | alloc_size = sizeof(*drv) + sizeof_priv; |
| 188 | 191 | ||
| 189 | drv = kzalloc(alloc_size, GFP_KERNEL); | 192 | drv = kzalloc(alloc_size, GFP_KERNEL); |
