Skip to contentSkip to conversation

ASoC: Intel: Skylake: remove bogus comparison of an array with NULL

PATCH New Vinod Koul 1 participant 1 message Feb 22, 2016

Subsystems (3)
lore
Share & tools
lore

Vinod Koul

author
#0 lore raw

PATCH v2 1/1 ASoC: Intel: Skylake: remove bogus comparison of an array with NULL

From: Alan Cox <[email protected]>

dfw_ac->params is an array not a pointer. It will never be NULL. The check on ac->max appears sufficient.

---
 sound/soc/intel/skylake/skl-topology.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/intel/skylake/skl-topology.c +1 -2
index 22a9e6fe1c05..99f50a034e1d 100644
@@ -1657,8 +1657,7 @@ static int skl_init_algo_data(struct device *dev, struct soc_bytes_ext *be,
 		if (!ac->params)
 			return -ENOMEM;
 
-		if (dfw_ac->params)
-			memcpy(ac->params, dfw_ac->params, ac->max);
+		memcpy(ac->params, dfw_ac->params, ac->max);
 	}
 
 	be->dobj.private  = ac;
Signature · 1 line
1.9.1