Commit 1b9df2d2 authored by Ola Olsson's avatar Ola Olsson Committed by Johannes Berg

cfg80211: ocb: Fix null pointer deref if join_ocb is unimplemented

Signed-off-by: default avatarOla Olsson <ola.olsson@sonymobile.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent cf595922
...@@ -29,6 +29,9 @@ int __cfg80211_join_ocb(struct cfg80211_registered_device *rdev, ...@@ -29,6 +29,9 @@ int __cfg80211_join_ocb(struct cfg80211_registered_device *rdev,
if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_OCB) if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_OCB)
return -EOPNOTSUPP; return -EOPNOTSUPP;
if (!rdev->ops->join_ocb)
return -EOPNOTSUPP;
if (WARN_ON(!setup->chandef.chan)) if (WARN_ON(!setup->chandef.chan))
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment