commit e84295c46eb56b29f8abb6d07f27c53cc2a74a32 Author: Jiri Slaby Date: Fri Jun 22 14:53:57 2007 +0200 check for null rates diff --git a/ath/if_ath_pci.c b/ath/if_ath_pci.c index 6a65fe7..4c6bfcc 100644 --- a/ath/if_ath_pci.c +++ b/ath/if_ath_pci.c @@ -272,6 +272,9 @@ static inline unsigned int ath_copy_rates(struct ieee80211_rate *rates, { unsigned int i; + if (rt == NULL) + return 0; + for (i = 0; i < rt->rate_count; i++, rates++) { rates->rate = rt->rates[i].rate_kbps / 100; rates->val = rt->rates[i].rate_code;