linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath5k: eliminate warning unintialized variable warning
@ 2010-08-30 18:11 John W. Linville
  2010-08-30 18:19 ` y
  2010-08-30 18:21 ` John W. Linville
  0 siblings, 2 replies; 4+ messages in thread
From: John W. Linville @ 2010-08-30 18:11 UTC (permalink / raw)
  To: linux-wireless; +Cc: me, johannes, John W. Linville

ath5k/base.c:1317: warning: ‘ret’ may be used uninitialized in this function

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/wireless/ath/base.c

diff --git a/drivers/net/wireless/ath/base.c b/drivers/net/wireless/ath/base.c
new file mode 100644
index 0000000..e69de29
-- 
1.7.2.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] ath5k: eliminate warning unintialized variable warning
  2010-08-30 18:11 [PATCH] ath5k: eliminate warning unintialized variable warning John W. Linville
@ 2010-08-30 18:19 ` y
  2010-08-30 18:21 ` John W. Linville
  1 sibling, 0 replies; 4+ messages in thread
From: y @ 2010-08-30 18:19 UTC (permalink / raw)
  To: linux-wireless; +Cc: me, johannes, John W. Linville

From: John W. Linville <linville@tuxdriver.com>

ath5k/base.c:1317: warning: ‘ret’ may be used uninitialized in this function

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
Actually include patch this time...

 drivers/net/wireless/ath/ath5k/base.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 7139c7e..116ac66 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1327,8 +1327,10 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf,
 			PCI_DMA_TODEVICE);
 
 	rate = ieee80211_get_tx_rate(sc->hw, info);
-	if (!rate)
+	if (!rate) {
+		ret = -EINVAL;
 		goto err_unmap;
+	}
 
 	if (info->flags & IEEE80211_TX_CTL_NO_ACK)
 		flags |= AR5K_TXDESC_NOACK;
-- 
1.7.2.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ath5k: eliminate warning unintialized variable warning
  2010-08-30 18:11 [PATCH] ath5k: eliminate warning unintialized variable warning John W. Linville
  2010-08-30 18:19 ` y
@ 2010-08-30 18:21 ` John W. Linville
  2010-08-30 18:42   ` me
  1 sibling, 1 reply; 4+ messages in thread
From: John W. Linville @ 2010-08-30 18:21 UTC (permalink / raw)
  To: linux-wireless; +Cc: me, johannes, John W. Linville

ath5k/base.c:1317: warning: ‘ret’ may be used uninitialized in this function

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
Actually include patch this time...
With right sender info this time...

 drivers/net/wireless/ath/ath5k/base.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 7139c7e..116ac66 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1327,8 +1327,10 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf,
 			PCI_DMA_TODEVICE);
 
 	rate = ieee80211_get_tx_rate(sc->hw, info);
-	if (!rate)
+	if (!rate) {
+		ret = -EINVAL;
 		goto err_unmap;
+	}
 
 	if (info->flags & IEEE80211_TX_CTL_NO_ACK)
 		flags |= AR5K_TXDESC_NOACK;
-- 
1.7.2.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ath5k: eliminate warning unintialized variable warning
  2010-08-30 18:21 ` John W. Linville
@ 2010-08-30 18:42   ` me
  0 siblings, 0 replies; 4+ messages in thread
From: me @ 2010-08-30 18:42 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, johannes

On Mon, Aug 30, 2010 at 02:21:56PM -0400, John W. Linville wrote:
> ath5k/base.c:1317: warning: ‘ret’ may be used uninitialized in this function
> 
> Reported-by: Johannes Berg <johannes@sipsolutions.net>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>

Thanks, 

Acked-by: Bob Copeland <me@bobcopeland.com>

The first one was cc: stable, do we need to do that too or just
give them a rolled up patch?

-- 
Bob Copeland %% www.bobcopeland.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-30 18:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-30 18:11 [PATCH] ath5k: eliminate warning unintialized variable warning John W. Linville
2010-08-30 18:19 ` y
2010-08-30 18:21 ` John W. Linville
2010-08-30 18:42   ` me

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).