diff options
author | Antonio Quartulli <antonio@open-mesh.com> | 2013-06-19 07:35:31 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-06-19 15:28:32 -0400 |
commit | 86a9c4a28b2c1a367d340db53570ebea02f33fca (patch) | |
tree | aa9580ae7b69616decfc7eb7406e93d048484734 /drivers/net/wireless/brcm80211/brcmfmac | |
parent | f2bbb07729f04bd8efa3f3285f19ba0609e42017 (diff) |
brcm80211: fix null pointer access
Do not unconditionally access the chan variable in
brcmf_cfg80211_mgmt_tx() as it may be NULL.
Use freq instead.
Introduced by c2ff8cad64233b539c71a27e2a6e324001143ef0
("brcm80211: make mgmt_tx in brcmfmac accept a NULL channel")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index 71f4db5fde99..277b37ae7126 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | |||
@@ -4050,8 +4050,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, | |||
4050 | le16_to_cpu(action_frame->len)); | 4050 | le16_to_cpu(action_frame->len)); |
4051 | 4051 | ||
4052 | brcmf_dbg(TRACE, "Action frame, cookie=%lld, len=%d, freq=%d\n", | 4052 | brcmf_dbg(TRACE, "Action frame, cookie=%lld, len=%d, freq=%d\n", |
4053 | *cookie, le16_to_cpu(action_frame->len), | 4053 | *cookie, le16_to_cpu(action_frame->len), freq); |
4054 | chan->center_freq); | ||
4055 | 4054 | ||
4056 | ack = brcmf_p2p_send_action_frame(cfg, cfg_to_ndev(cfg), | 4055 | ack = brcmf_p2p_send_action_frame(cfg, cfg_to_ndev(cfg), |
4057 | af_params); | 4056 | af_params); |