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] [thread-next>] [day] [month] [year] [list]
Message-ID: <52AFF951.9020201@metafoo.de>
Date:	Tue, 17 Dec 2013 08:12:17 +0100
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Xiubo Li <Li.Xiubo@...escale.com>
CC:	lgirdwood@...il.com, broonie@...nel.org, perex@...ex.cz,
	tiwai@...e.de, alsa-devel@...a-project.org,
	linux-kernel@...r.kernel.org
Subject: Re: [alsa-devel] [PATCH] ASoC: dmaengine: Add config parameter NULL
 check.

On 12/17/2013 08:16 AM, Xiubo Li wrote:
> Because the "ASoC: dmaengine-pcm: Provide default config" has provided
> us one defualt config of DMA. When using this, the config parameter of
> devm_snd_dmaengine_pcm_register() will be NULL, so here we need to have
> a check before using it.
> 
> Signed-off-by: Xiubo Li <Li.Xiubo@...escale.com>

Acked-by: Lars-Peter Clausen <lars@...afoo.de>

Thanks.

> ---
>  sound/soc/soc-generic-dmaengine-pcm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c
> index 7483922..2a6c569 100644
> --- a/sound/soc/soc-generic-dmaengine-pcm.c
> +++ b/sound/soc/soc-generic-dmaengine-pcm.c
> @@ -299,7 +299,7 @@ static int dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm,
>  	    !dev->of_node)
>  		return 0;
>  
> -	if (config->dma_dev) {
> +	if (config && config->dma_dev) {
>  		/*
>  		 * If this warning is seen, it probably means that your Linux
>  		 * device structure does not match your HW device structure.
> @@ -317,7 +317,7 @@ static int dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm,
>  			name = "rx-tx";
>  		else
>  			name = dmaengine_pcm_dma_channel_names[i];
> -		if (config->chan_names[i])
> +		if (config && config->chan_names[i])
>  			name = config->chan_names[i];
>  		chan = dma_request_slave_channel_reason(dev, name);
>  		if (IS_ERR(chan)) {
> 

--
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