diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c index 667eccc676a40a8898f887ef21288cefa717624f..ea06877be4b135fb8256de12ebe416dc9df46901 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;