Skip to content

Commit

Permalink
ALSA: sb8 - Fix a return code in the error path
Browse files Browse the repository at this point in the history
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 <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Dec 11, 2008
1 parent acc4216 commit 42a73df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sound/isa/sb/sb8.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 42a73df

Please sign in to comment.