Skip to content

Commit

Permalink
ALSA: sb_mixer: missing return statement
Browse files Browse the repository at this point in the history
The if condition here was supposed to return on error but the return
statement is missing.  The effect is that the ->mixername is set to
"???" instead of "DT019X".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Dan Carpenter authored and Takashi Iwai committed May 14, 2014
1 parent ff2354b commit 665ebe9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions sound/isa/sb/sb_mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,12 +818,14 @@ int snd_sbmixer_new(struct snd_sb *chip)
return err;
break;
case SB_HW_DT019X:
if ((err = snd_sbmixer_init(chip,
snd_dt019x_controls,
ARRAY_SIZE(snd_dt019x_controls),
snd_dt019x_init_values,
ARRAY_SIZE(snd_dt019x_init_values),
"DT019X")) < 0)
err = snd_sbmixer_init(chip,
snd_dt019x_controls,
ARRAY_SIZE(snd_dt019x_controls),
snd_dt019x_init_values,
ARRAY_SIZE(snd_dt019x_init_values),
"DT019X");
if (err < 0)
return err;
break;
default:
strcpy(card->mixername, "???");
Expand Down

0 comments on commit 665ebe9

Please sign in to comment.