From: Takashi Iwai Date: Sun, 30 Nov 2014 19:13:16 +0000 (+0100) Subject: ALSA: virmidi: Fix wrong error check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fc5d3c70f97ba54bf3d3b585912b0a76a78fb718;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ALSA: virmidi: Fix wrong error check While rewriting the code in the previous commit [316638a5030a: ALSA: virmidi: fixed code style issues], the error check was wrongly converted. This resulted an Oops. Fixes: 316638a5030a ('ALSA: virmidi: fixed code style issues') Reported-by: Fengguang Wu Signed-off-by: Takashi Iwai --- diff --git a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c index 0af88d926793..d28d8706443c 100644 --- a/sound/drivers/virmidi.c +++ b/sound/drivers/virmidi.c @@ -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; }