All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch -next] asihpi: testing the wrong variable
@ 2010-05-14 14:49 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2010-05-14 14:49 UTC (permalink / raw)
  To: Jaroslav Kysela
  Cc: Takashi Iwai, Eliot Blennerhassett, alsa-devel, kernel-janitors

There is a typo here.  We want to test "*dst" not "dst".

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/sound/pci/asihpi/hpifunc.c b/sound/pci/asihpi/hpifunc.c
index 254c580..15f0c7e 100644
--- a/sound/pci/asihpi/hpifunc.c
+++ b/sound/pci/asihpi/hpifunc.c
@@ -3279,7 +3279,7 @@ static u16 hpi_entity_alloc_and_copy(struct hpi_entity *src,
 
 	buf_size = hpi_entity_size(src);
 	*dst = kmalloc(buf_size, GFP_KERNEL);
-	if (dst == NULL)
+	if (*dst == NULL)
 		return HPI_ERROR_MEMORY_ALLOC;
 	memcpy(*dst, src, buf_size);
 	return 0;

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

* [patch -next] asihpi: testing the wrong variable
@ 2010-05-14 14:49 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2010-05-14 14:49 UTC (permalink / raw)
  To: Jaroslav Kysela
  Cc: Takashi Iwai, Eliot Blennerhassett, alsa-devel, kernel-janitors

There is a typo here.  We want to test "*dst" not "dst".

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/sound/pci/asihpi/hpifunc.c b/sound/pci/asihpi/hpifunc.c
index 254c580..15f0c7e 100644
--- a/sound/pci/asihpi/hpifunc.c
+++ b/sound/pci/asihpi/hpifunc.c
@@ -3279,7 +3279,7 @@ static u16 hpi_entity_alloc_and_copy(struct hpi_entity *src,
 
 	buf_size = hpi_entity_size(src);
 	*dst = kmalloc(buf_size, GFP_KERNEL);
-	if (dst = NULL)
+	if (*dst = NULL)
 		return HPI_ERROR_MEMORY_ALLOC;
 	memcpy(*dst, src, buf_size);
 	return 0;

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

* Re: [patch -next] asihpi: testing the wrong variable
  2010-05-14 14:49 ` Dan Carpenter
@ 2010-05-17  6:16   ` Takashi Iwai
  -1 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2010-05-17  6:16 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Eliot Blennerhassett, alsa-devel, kernel-janitors

At Fri, 14 May 2010 16:49:20 +0200,
Dan Carpenter wrote:
> 
> There is a typo here.  We want to test "*dst" not "dst".
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Thanks.  Applied (your other fix for asihpi, too).


Takashi

> diff --git a/sound/pci/asihpi/hpifunc.c b/sound/pci/asihpi/hpifunc.c
> index 254c580..15f0c7e 100644
> --- a/sound/pci/asihpi/hpifunc.c
> +++ b/sound/pci/asihpi/hpifunc.c
> @@ -3279,7 +3279,7 @@ static u16 hpi_entity_alloc_and_copy(struct hpi_entity *src,
>  
>  	buf_size = hpi_entity_size(src);
>  	*dst = kmalloc(buf_size, GFP_KERNEL);
> -	if (dst == NULL)
> +	if (*dst == NULL)
>  		return HPI_ERROR_MEMORY_ALLOC;
>  	memcpy(*dst, src, buf_size);
>  	return 0;
> 

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

* Re: [patch -next] asihpi: testing the wrong variable
@ 2010-05-17  6:16   ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2010-05-17  6:16 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Eliot Blennerhassett, alsa-devel, kernel-janitors

At Fri, 14 May 2010 16:49:20 +0200,
Dan Carpenter wrote:
> 
> There is a typo here.  We want to test "*dst" not "dst".
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Thanks.  Applied (your other fix for asihpi, too).


Takashi

> diff --git a/sound/pci/asihpi/hpifunc.c b/sound/pci/asihpi/hpifunc.c
> index 254c580..15f0c7e 100644
> --- a/sound/pci/asihpi/hpifunc.c
> +++ b/sound/pci/asihpi/hpifunc.c
> @@ -3279,7 +3279,7 @@ static u16 hpi_entity_alloc_and_copy(struct hpi_entity *src,
>  
>  	buf_size = hpi_entity_size(src);
>  	*dst = kmalloc(buf_size, GFP_KERNEL);
> -	if (dst = NULL)
> +	if (*dst = NULL)
>  		return HPI_ERROR_MEMORY_ALLOC;
>  	memcpy(*dst, src, buf_size);
>  	return 0;
> 

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

end of thread, other threads:[~2010-05-17  6:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-14 14:49 [patch -next] asihpi: testing the wrong variable Dan Carpenter
2010-05-14 14:49 ` Dan Carpenter
2010-05-17  6:16 ` Takashi Iwai
2010-05-17  6:16   ` Takashi Iwai

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.