All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] asoc atmel_ssc: Don't try to free ssc if request failed
@ 2011-06-01 21:59 Joachim Eastwood
  2011-06-02 18:05 ` Mark Brown
  2011-06-03  9:08 ` Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Joachim Eastwood @ 2011-06-01 21:59 UTC (permalink / raw)
  To: alsa-devel, sedji.gaouaou, broonie

Hello,

Patch below fixes a segmentation fault in atmel_ssc_dai if ssc_request() fails.

We should only call ssc_free() when ssc_request() succeeds or bad
things will happen.

Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
---
 sound/soc/atmel/atmel_ssc_dai.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
index 7fbfa05..eda955b 100644
--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -848,9 +848,10 @@ int atmel_ssc_set_audio(int ssc_id)
 	if (IS_ERR(ssc))
 		pr_warn("Unable to parent ASoC SSC DAI on SSC: %ld\n",
 			PTR_ERR(ssc));
-	else
+	else {
 		ssc_pdev->dev.parent = &(ssc->pdev->dev);
-	ssc_free(ssc);
+		ssc_free(ssc);
+	}

 	ret = platform_device_add(ssc_pdev);
 	if (ret < 0)
-- 
1.7.5.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] asoc atmel_ssc: Don't try to free ssc if request failed
  2011-06-01 21:59 [PATCH] asoc atmel_ssc: Don't try to free ssc if request failed Joachim Eastwood
@ 2011-06-02 18:05 ` Mark Brown
  2011-06-02 18:11   ` Liam Girdwood
  2011-06-03  9:08 ` Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Mark Brown @ 2011-06-02 18:05 UTC (permalink / raw)
  To: Joachim Eastwood; +Cc: alsa-devel, lrg

On Wed, Jun 01, 2011 at 11:59:10PM +0200, Joachim Eastwood wrote:
> Hello,
> 
> Patch below fixes a segmentation fault in atmel_ssc_dai if ssc_request() fails.
> 
> We should only call ssc_free() when ssc_request() succeeds or bad
> things will happen.

Adding Liam for his review.  Please CC maintainers on patches.

> 
> Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
> ---
>  sound/soc/atmel/atmel_ssc_dai.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
> index 7fbfa05..eda955b 100644
> --- a/sound/soc/atmel/atmel_ssc_dai.c
> +++ b/sound/soc/atmel/atmel_ssc_dai.c
> @@ -848,9 +848,10 @@ int atmel_ssc_set_audio(int ssc_id)
>  	if (IS_ERR(ssc))
>  		pr_warn("Unable to parent ASoC SSC DAI on SSC: %ld\n",
>  			PTR_ERR(ssc));
> -	else
> +	else {
>  		ssc_pdev->dev.parent = &(ssc->pdev->dev);
> -	ssc_free(ssc);
> +		ssc_free(ssc);
> +	}
> 
>  	ret = platform_device_add(ssc_pdev);
>  	if (ret < 0)
> -- 
> 1.7.5.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] asoc atmel_ssc: Don't try to free ssc if request failed
  2011-06-02 18:05 ` Mark Brown
@ 2011-06-02 18:11   ` Liam Girdwood
  0 siblings, 0 replies; 4+ messages in thread
From: Liam Girdwood @ 2011-06-02 18:11 UTC (permalink / raw)
  To: Mark Brown; +Cc: Joachim Eastwood, alsa-devel

On 02/06/11 19:05, Mark Brown wrote:
> On Wed, Jun 01, 2011 at 11:59:10PM +0200, Joachim Eastwood wrote:
>> Hello,
>>
>> Patch below fixes a segmentation fault in atmel_ssc_dai if ssc_request() fails.
>>
>> We should only call ssc_free() when ssc_request() succeeds or bad
>> things will happen.
> 
> Adding Liam for his review.  Please CC maintainers on patches.
> 
>>
>> Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>

Acked-by: Liam Girdwood <lrg@ti.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] asoc atmel_ssc: Don't try to free ssc if request failed
  2011-06-01 21:59 [PATCH] asoc atmel_ssc: Don't try to free ssc if request failed Joachim Eastwood
  2011-06-02 18:05 ` Mark Brown
@ 2011-06-03  9:08 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2011-06-03  9:08 UTC (permalink / raw)
  To: Joachim Eastwood; +Cc: sedji.gaouaou, alsa-devel

On Wed, Jun 01, 2011 at 11:59:10PM +0200, Joachim Eastwood wrote:
> Hello,
> 
> Patch below fixes a segmentation fault in atmel_ssc_dai if ssc_request() fails.
> 
> We should only call ssc_free() when ssc_request() succeeds or bad
> things will happen.
> 
> Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>

Applied, thanks.  Please try to follow the patch format in
SubmittingPatches - in particular, remember that the body of your mail
is going to get used as the commit message.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-06-03  9:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-01 21:59 [PATCH] asoc atmel_ssc: Don't try to free ssc if request failed Joachim Eastwood
2011-06-02 18:05 ` Mark Brown
2011-06-02 18:11   ` Liam Girdwood
2011-06-03  9:08 ` Mark Brown

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.