mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-16 11:44:52 +00:00
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>
This commit is contained in:
parent
cf595922b9
commit
1b9df2d20e
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue