提交 fc5d3c70 编写于 作者: T 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: NFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 316638a5
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册