lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 11 May 2012 12:10:41 +0200
From:	Takashi Iwai <tiwai@...e.de>
To:	Bo Shen <voice.shen@...el.com>
Cc:	linux-kernel@...r.kernel.org, linux-sound@...r.kernel.org,
	alsa-devel@...a-project.org, nicolas.ferre@...el.com,
	plagnioj@...osoft.com, josh.wu@...el.com, jm.lin@...el.com
Subject: Re: [PATCH] atmel/ac97c: correct the unexpected behavior when using uninitial value for reset pin

At Fri, 11 May 2012 17:39:28 +0800,
Bo Shen wrote:
> 
> When pdata->reset_pin is passed with a negative value (means gpio
> is invalid), then chip->reset_pin will not be assigned to a vaule,
> it will use default value 0. This will cause unexpected behavior.
> 
> So, add this patch to correct.
> 
> Signed-off-by: Bo Shen <voice.shen@...el.com>
> Acked-by: Nicolas Ferre <nicolas.ferre@...el.com>

Applied now.  Thanks.


Takashi

> ---
>  sound/atmel/ac97c.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c
> index 115313e..f5ded64 100644
> --- a/sound/atmel/ac97c.c
> +++ b/sound/atmel/ac97c.c
> @@ -991,6 +991,8 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev)
>  			gpio_direction_output(pdata->reset_pin, 1);
>  			chip->reset_pin = pdata->reset_pin;
>  		}
> +	} else {
> +		chip->reset_pin = -EINVAL;
>  	}
>  
>  	snd_card_set_dev(card, &pdev->dev);
> -- 
> 1.7.10
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ