Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751242AbdHXEoU (ORCPT ); Thu, 24 Aug 2017 00:44:20 -0400 Received: from regular1.263xmail.com ([211.150.99.135]:40850 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751133AbdHXEoS (ORCPT ); Thu, 24 Aug 2017 00:44:18 -0400 X-263anti-spam: KSV:0;BIG:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ADDR-CHECKED4: 1 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ANTISPAM-LEVEL: 2 X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: dolinux.peng@gmail.com X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Message-ID: <599E599C.1060308@rock-chips.com> Date: Thu, 24 Aug 2017 12:44:12 +0800 From: jeffy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20130126 Thunderbird/19.0 MIME-Version: 1.0 To: Donglin Peng CC: linux-kernel@vger.kernel.org, Mark Brown , tiwai@suse.de, Jaroslav Kysela , alsa-devel@alsa-project.org, Takashi Iwai , Liam Girdwood Subject: Re: [PATCH v2] ASoC: Add a sanity check before using dai driver name References: <20170824033411.5788-1-jeffy.chen@rock-chips.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 814 Lines: 24 Hi Dong, Thanks for noticing, will send new patch soon :) On 08/24/2017 11:46 AM, Donglin Peng wrote: > On Thu, Aug 24, 2017 at 11:34 AM, Jeffy Chen wrote: >> list_for_each_entry(dai, &component->dai_list, list) { >> if (dlc->dai_name && strcmp(dai->name, dlc->dai_name) >> - && strcmp(dai->driver->name, dlc->dai_name)) >> + && (!dai->driver->name >> + || !strcmp(dai->driver->name, dlc->dai_name)) >> continue; > > If the dai->driver->name is match with the dlc->dai_name, does it need > to continue? hmm, sorry, i did this in a hurry, should setup my board and test it.. > >> >> return dai; > > >