Skip to contentSkip to conversation

sound: ac97_pcm.c fix shadowed variable warning

PATCH Applied Harvey Harrison 1 participant 1 message Feb 28, 2008 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 8/12 sound: ac97_pcm.c fix shadowed variable warning

err is always assigned before it is used, no need to declare another inside the if statement.
sound/pci/ac97/ac97_pcm.c:577:7: warning: symbol 'err' shadows an earlier one sound/pci/ac97/ac97_pcm.c:572:6: originally declared here

---
 sound/pci/ac97/ac97_pcm.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
sound/pci/ac97/ac97_pcm.c +0 -1
index 3674f35..48cbda9 100644
@@ -574,7 +574,6 @@ int snd_ac97_pcm_open(struct ac97_pcm *pcm, unsigned int rate,
 	r = rate > 48000;
 	bus = pcm->bus;
 	if (cfg == AC97_PCM_CFG_SPDIF) {
-		int err;
 		for (cidx = 0; cidx < 4; cidx++)
 			if (bus->codec[cidx] && (bus->codec[cidx]->ext_id & AC97_EI_SPDIF)) {
 				err = set_spdif_rate(bus->codec[cidx], rate);
Signature · 1 line
1.5.4.3.342.g99e8