Skip to contentSkip to conversation

ath5k: undo overzealous hunk of "ath5k: avoid oops when..."

PATCH In review John W. Linville 2 participants 2 messages Oct 23, 2007 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath5k: undo overzealous hunk of "ath5k: avoid oops when..."

The first hunk of "ath5k: avoid oops when ah_capabilities.cap_mode not set" was ill-advised. It can cause the it's loop to abort prematurely.

Signed-off-by John W. Linville <linville.tuxdriver.com>
---
 drivers/net/wireless/ath5k/base.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
drivers/net/wireless/ath5k/base.c +0 -3
index c38adab..e764fd3 100644
@@ -1991,9 +1991,6 @@ static int ath5k_getchannels(struct ieee80211_hw *hw)
 		}
 
 		hw_rates = ath5k_hw_get_rate_table(ah, mode->mode);
-		if (!hw_rates)
-			return -EINVAL;
-
 		mode->num_rates    = ath5k_copy_rates(mode->rates, hw_rates,
 			max_r);
 		mode->num_channels = ath5k_copy_channels(ah, mode->channels,
Signature · 1 line
1.5.2.4
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · John W. Linville

The first hunk of "ath5k: avoid oops when ah_capabilities.cap_mode not set" was ill-advised. It can cause the it's loop to abort prematurely.

Signed-off-by John W. Linville <linville.tuxdriver.com>

Luis