lkml.org 
[lkml]   [2009]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/4] SOUND: via82xx, use uninitialized_var(chip)
Date
To avoid wrong compiler warnings, use unitialized_var(chip) in
snd_via82xx_probe's from via82xx and via82xx_modem drivers.

'chip' is unused when unset due to retval being nonzero.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jaroslav Kysela <perex@perex.cz>
---
sound/pci/via82xx.c | 2 +-
sound/pci/via82xx_modem.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index acfa476..0ae6224 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -2435,7 +2435,7 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
struct snd_card *card;
- struct via82xx *chip;
+ struct via82xx *uninitialized_var(chip);
int chip_type = 0, card_type;
unsigned int i;
int err;
diff --git a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c
index 47eb615..f230f5e 100644
--- a/sound/pci/via82xx_modem.c
+++ b/sound/pci/via82xx_modem.c
@@ -1165,7 +1165,7 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
struct snd_card *card;
- struct via82xx_modem *chip;
+ struct via82xx_modem *uninitialized_var(chip);
int chip_type = 0, card_type;
unsigned int i;
int err;
--
1.6.3.3


\
 
 \ /
  Last update: 2009-08-25 23:03    [W:0.039 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site