All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tobin Davis <tdavis@dsl-only.net>
To: Jason Baron <jbaron@redhat.com>
Cc: alsa-devel@alsa-project.org, John Linville <linville@redhat.com>
Subject: Re: stac92xx_parse_auto_config() can return 0 on	error?
Date: Mon, 05 Feb 2007 14:29:53 -0800	[thread overview]
Message-ID: <1170714593.28278.151.camel@localhost> (raw)
In-Reply-To: <Pine.LNX.4.64.0702051624060.26250@dhcp83-20.boston.redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 987 bytes --]

On Mon, 2007-02-05 at 16:40 -0500, Jason Baron wrote:

> hi,
> 
> I just ran into a RHEL4 U5 beta kernel oops in snd_hda_input_mux_info(), 
> because the 'imux' parameter pointer was NULL. I traced this back to 
> stac92xx_parse_auto_config(), which can return 0, if 'line_outs' is not 
> set, without having initialized the 'input_mux'.
> 
> The oops does not happen on the upstream kernel on this hardware b/c 
> 'line_outs' was set (additional code has been added since RHEL4 to set 
> it). However, it still appears to me, that if 'line_outs' is not set, we 
> should return an error code, and not 0.
> 
> thanks,
> 
> -Jason

Try this patch to see if it works with your alsa version.  It's a simple
patch that adds the error condition, and should be able to be applied to
older alsa versions.

Summary:  add error for undetected line_outs.

This adds an error condition to stac92xx_parse_auto_config if line_outs
is less than zero.


Signed off by Tobin Davis <tdavis@dsl-only.net>

[-- Attachment #1.2: Type: text/html, Size: 1681 bytes --]

[-- Attachment #2: stax92xx-autocfg-fix.patch --]
[-- Type: text/x-patch, Size: 558 bytes --]

diff -r c783393557a8 pci/hda/patch_sigmatel.c
--- a/pci/hda/patch_sigmatel.c	Wed Jan 24 16:13:35 2007 +0100
+++ b/pci/hda/patch_sigmatel.c	Mon Feb 05 14:24:57 2007 -0800
@@ -1375,8 +1375,8 @@ static int stac92xx_parse_auto_config(st
 						&spec->autocfg,
 						spec->dmic_nids)) < 0)
 		return err;
-	if (! spec->autocfg.line_outs)
-		return 0; /* can't find valid pin config */
+	if ((err = spec->autocfg.line_outs) < 0)
+		return err; /* can't find valid pin config */
 
 	if ((err = stac92xx_add_dyn_out_pins(codec, &spec->autocfg)) < 0)
 		return err;

[-- Attachment #3: Type: text/plain, Size: 374 bytes --]

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

[-- Attachment #4: Type: text/plain, Size: 161 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel

  reply	other threads:[~2007-02-05 22:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-05 21:40 stac92xx_parse_auto_config() can return 0 on error? Jason Baron
2007-02-05 22:29 ` Tobin Davis [this message]
2007-02-06 11:47   ` Takashi Iwai
2007-02-06 16:53     ` Jason Baron
2007-02-06 17:00       ` Takashi Iwai
2007-02-08 15:30     ` Takashi Iwai
2007-02-08 16:34       ` Jason Baron

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=1170714593.28278.151.camel@localhost \
    --to=tdavis@dsl-only.net \
    --cc=alsa-devel@alsa-project.org \
    --cc=jbaron@redhat.com \
    --cc=linville@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.