Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: alsa-devel@alsa-project.org, LKP <lkp@01.org>,
	linux-kernel@vger.kernel.org,
	Kyle Chamberlin <kylechamberlin@project20million.org>
Subject: Re: [alsa/virmidi] BUG: unable to handle kernel NULL pointer dereference at 000002a0
Date: Sun, 30 Nov 2014 20:19:02 +0100	[thread overview]
Message-ID: <s5h7fyca449.wl-tiwai@suse.de> (raw)
In-Reply-To: <20141130185019.GA12359@wfg-t540p.sh.intel.com>

At Sun, 30 Nov 2014 10:50:19 -0800,
Fengguang Wu wrote:
At Sun, 30 Nov 2014 10:50:19 -0800,
Fengguang Wu wrote:
> 
> Hi Kyle,
> 
> 0day kernel testing robot got the below dmesg and the first bad commit is
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
> 
> commit 316638a5030a04bb3259dcbca0632281001a4b24
> Author:     Kyle Chamberlin <kylechamberlin@project20million.org>
> AuthorDate: Fri Nov 28 13:59:56 2014 -0500
> Commit:     Takashi Iwai <tiwai@suse.de>
> CommitDate: Sat Nov 29 21:34:47 2014 +0100
> 
>     ALSA: virmidi: fixed code style issues
>     
>     Fixed some minor code style issues and also removed some
>     assignments inside of if conditionals.
>     
>     Signed-off-by: Kyle Chamberlin <kylechamberlin@project20million.org>
>     Signed-off-by: Takashi Iwai <tiwai@suse.de>
> 
> In particular, this chunk introduced the behavior change:
> 
> -       if ((err = snd_card_register(card)) == 0) {
> +       err = snd_card_register(card);
> +       if (err) {

Doh, it's an obvious error.  Sorry for overlooking it at review.

Fixed now in sound git tree as below.


thanks,

Takashi

-- 8< --
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] 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 <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/drivers/virmidi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 	}
-- 
2.1.3

      reply	other threads:[~2014-11-30 19:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-30 18:50 [alsa/virmidi] BUG: unable to handle kernel NULL pointer dereference at 000002a0 Fengguang Wu
2014-11-30 19:19 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h7fyca449.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=fengguang.wu@intel.com \
    --cc=kylechamberlin@project20million.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox