From 42a73df435a23e60d97d9d860f4e55dc9833e950 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 11 Dec 2008 12:12:06 +0100 Subject: [PATCH] ALSA: sb8 - Fix a return code in the error path MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixed a compile warning below: sound/isa/sb/sb8.c: In function ‘snd_sb8_probe’: sound/isa/sb/sb8.c:104: warning: ‘err’ may be used uninitialized in this function by setting the return value correctly. Signed-off-by: Takashi Iwai --- sound/isa/sb/sb8.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c index 667eccc..ea06877 100644 --- a/sound/isa/sb/sb8.c +++ b/sound/isa/sb/sb8.c @@ -140,8 +140,10 @@ static int __devinit snd_sb8_probe(struct device *pdev, unsigned int dev) break; } } - if (i >= ARRAY_SIZE(possible_ports)) + if (i >= ARRAY_SIZE(possible_ports)) { + err = -EINVAL; goto _err; + } } acard->chip = chip; -- 2.7.4