Commit fc5d3c70 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: virmidi: Fix wrong error check

While rewriting the code in the previous commit [316638a5: ALSA:
virmidi: fixed code style issues], the error check was wrongly
converted.  This resulted an Oops.

Fixes: 316638a5 ('ALSA: virmidi: fixed code style issues')
Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 316638a5
...@@ -121,7 +121,7 @@ static int snd_virmidi_probe(struct platform_device *devptr) ...@@ -121,7 +121,7 @@ static int snd_virmidi_probe(struct platform_device *devptr)
sprintf(card->longname, "Virtual MIDI Card %i", dev + 1); sprintf(card->longname, "Virtual MIDI Card %i", dev + 1);
err = snd_card_register(card); err = snd_card_register(card);
if (err) { if (!err) {
platform_set_drvdata(devptr, card); platform_set_drvdata(devptr, card);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment