rtl8180: avoid potential NULL deref in rtl8180_beacon_work

ieee80211_beacon_get can return NULL...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: stable@kernel.org
This commit is contained in:
John W. Linville 2010-08-05 13:46:27 -04:00
parent c5d2711cb5
commit 8f1d2d2be7

View File

@ -695,6 +695,8 @@ static void rtl8180_beacon_work(struct work_struct *work)
/* grab a fresh beacon */
skb = ieee80211_beacon_get(dev, vif);
if (!skb)
goto resched;
/*
* update beacon timestamp w/ TSF value