From b0fc7c1a643bb0e689cd2846b0edf7c707a87600 Mon Sep 17 00:00:00 2001 From: Kalle Valo Date: Mon, 12 Mar 2012 13:22:54 +0200 Subject: [PATCH] ath6kl: fix regression in ath6kl_upload_board_file() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit My patch 24fc32b3 ("ath6kl: add ath6kl_bmi_write_hi32()") caused a regression in ath6kl_upload_board_file() and the board_address variable was not properly initialised in some cases: ath6kl/init.c:1068:6: warning: ‘board_address’ may be used uninitialized in this function Most likely this broke ar6004 support but I can't test that right now. Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath6kl/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c index 231675d4bf70..03cae142f178 100644 --- a/drivers/net/wireless/ath/ath6kl/init.c +++ b/drivers/net/wireless/ath/ath6kl/init.c @@ -1078,8 +1078,9 @@ static int ath6kl_upload_board_file(struct ath6kl *ar) * writing board data. */ if (ar->hw.board_addr != 0) { + board_address = ar->hw.board_addr; ath6kl_bmi_write_hi32(ar, hi_board_data, - ar->hw.board_addr); + board_address); } else { ath6kl_bmi_read_hi32(ar, hi_board_data, &board_address); } -- 2.34.1