From: Vinod Koul Subject: [PATCH 2/3] ASoC: Intel: Skylake: remove bogus comparison of an array with NULL Date: Fri, 19 Feb 2016 11:42:33 +0530 Message-ID: <1455862354-6455-2-git-send-email-vinod.koul@intel.com> References: <1455862354-6455-1-git-send-email-vinod.koul@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by alsa0.perex.cz (Postfix) with ESMTP id 2BDD1261ADA for ; Fri, 19 Feb 2016 07:08:53 +0100 (CET) In-Reply-To: <1455862354-6455-1-git-send-email-vinod.koul@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: alsa-devel@alsa-project.org Cc: Alan , patches.audio@intel.com, liam.r.girdwood@linux.intel.com, Vinod Koul , broonie@kernel.org, Alan Cox List-Id: alsa-devel@alsa-project.org From: Alan dfw_ac->params is an array not a pointer. It will never be NULL. The check on ac->max appears sufficient. Signed-off-by: Alan Cox Signed-off-by: Vinod Koul --- sound/soc/intel/skylake/skl-topology.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c index 22a9e6fe1c05..99f50a034e1d 100644 --- a/sound/soc/intel/skylake/skl-topology.c +++ b/sound/soc/intel/skylake/skl-topology.c @@ -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; -- 1.9.1