summaryrefslogtreecommitdiff
path: root/net/wireless/ocb.c
diff options
context:
space:
mode:
authorOla Olsson <ola1olsson@gmail.com>2015-11-10 00:02:09 +0300
committerJohannes Berg <johannes.berg@intel.com>2015-12-04 16:43:32 +0300
commit1b9df2d20eee9f3a675d1a3a7aa3640e6d8d7e94 (patch)
treecdbe085620f5dd2fd225969079caf99d7db5dbc8 /net/wireless/ocb.c
parentcf595922b9a3b61e308224fd29909f54ecb557d4 (diff)
downloadlinux-1b9df2d20eee9f3a675d1a3a7aa3640e6d8d7e94.tar.xz
cfg80211: ocb: Fix null pointer deref if join_ocb is unimplemented
Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/ocb.c')
-rw-r--r--net/wireless/ocb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/wireless/ocb.c b/net/wireless/ocb.c
index c00d4a792319..e64dbf16330c 100644
--- a/net/wireless/ocb.c
+++ b/net/wireless/ocb.c
@@ -29,6 +29,9 @@ int __cfg80211_join_ocb(struct cfg80211_registered_device *rdev,
if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_OCB)
return -EOPNOTSUPP;
+ if (!rdev->ops->join_ocb)
+ return -EOPNOTSUPP;
+
if (WARN_ON(!setup->chandef.chan))
return -EINVAL;