linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@web.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "linux-wireless" <linux-wireless@vger.kernel.org>,
	Tomas Winkler <tomasw@gmail.com>, mcgrof <mcgrof@gmail.com>
Subject: [PATCH] p54: fix build warnings
Date: Sat, 25 Oct 2008 16:14:14 +0200	[thread overview]
Message-ID: <200810251614.14514.chunkeey@web.de> (raw)
In-Reply-To: <1224923050.27353.1.camel@johannes.berg>

On Saturday 25 October 2008 10:24:10 Johannes Berg wrote:
> just FYI in case you haven't seen them. the p54 one looks like a genu=
ine
> problem.
>
> drivers/net/wireless/p54/p54common.c: In function =E2=80=98p54_parse_=
eeprom=E2=80=99:
> drivers/net/wireless/p54/p54common.c:325: warning: =E2=80=98synth=E2=80=
=99 may be used uninitialized in this function

There you go. Yes, it is a genuine problem, if the device's eeprom is s=
crewed really up.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
---
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireles=
s/p54/p54common.c
index 360f35b..02a306d 100644
--- a/drivers/net/wireless/p54/p54common.c
+++ b/drivers/net/wireless/p54/p54common.c
@@ -322,7 +322,7 @@ static int p54_parse_eeprom(struct ieee80211_hw *de=
v, void *eeprom, int len)
 	void *tmp;
 	int err;
 	u8 *end =3D (u8 *)eeprom + len;
-	u16 synth;
+	u16 synth =3D 0;
 	DECLARE_MAC_BUF(mac);
=20
 	wrap =3D (struct eeprom_pda_wrap *) eeprom;
@@ -425,7 +425,8 @@ static int p54_parse_eeprom(struct ieee80211_hw *de=
v, void *eeprom, int len)
 		entry =3D (void *)entry + (entry_len + 1)*2;
 	}
=20
-	if (!priv->iq_autocal || !priv->output_limit || !priv->curve_data) {
+	if (!synth || !priv->iq_autocal || !priv->output_limit ||
+	    !priv->curve_data) {
 		printk(KERN_ERR "p54: not all required entries found in eeprom!\n");
 		err =3D -EINVAL;
 		goto err;
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-10-25 14:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-25  8:24 build warnings Johannes Berg
2008-10-25 14:14 ` Christian Lamparter [this message]
2008-10-27 10:30 ` Tomas Winkler
2008-10-27 10:34   ` Johannes Berg
2008-10-27 10:41     ` Tomas Winkler
2008-10-27 13:28       ` John W. Linville

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200810251614.14514.chunkeey@web.de \
    --to=chunkeey@web.de \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mcgrof@gmail.com \
    --cc=tomasw@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).