Skip to contentSkip to conversation

asihpi: testing the wrong variable

PATCH In review Dan Carpenter 2 participants 2 messages May 14, 2010 – May 17, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 asihpi: testing the wrong variable

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

sound/pci/asihpi/hpifunc.c +1 -1
index 254c580..15f0c7e 100644
@@ -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;
#1 lore raw

At Fri, 14 May 2010 16:49:20 +0200,

Quoted 4 lines · Dan Carpenter

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

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

Takashi

Quoted 14 lines
sound/pci/asihpi/hpifunc.c +1 -1
index 254c580..15f0c7e 100644
@@ -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;