Skip to content

Commit

Permalink
ALSA: virmidi: Fix wrong error check
Browse files Browse the repository at this point in the history
While rewriting the code in the previous commit [316638a: ALSA:
virmidi: fixed code style issues], the error check was wrongly
converted.  This resulted an Oops.

Fixes: 316638a ('ALSA: virmidi: fixed code style issues')
Reported-by: Fengguang Wu <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Nov 30, 2014
1 parent 316638a commit fc5d3c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/drivers/virmidi.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static int snd_virmidi_probe(struct platform_device *devptr)
sprintf(card->longname, "Virtual MIDI Card %i", dev + 1);

err = snd_card_register(card);
if (err) {
if (!err) {
platform_set_drvdata(devptr, card);
return 0;
}
Expand Down

0 comments on commit fc5d3c7

Please sign in to comment.