Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932946AbdHVOPz (ORCPT ); Tue, 22 Aug 2017 10:15:55 -0400 Received: from mail-qk0-f176.google.com ([209.85.220.176]:35605 "EHLO mail-qk0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932510AbdHVOPy (ORCPT ); Tue, 22 Aug 2017 10:15:54 -0400 MIME-Version: 1.0 In-Reply-To: <20170822140255.t2wfwkjr67v3eoxu@sirena.org.uk> References: <20170822075729.8438-1-jeffy.chen@rock-chips.com> <20170822075729.8438-3-jeffy.chen@rock-chips.com> <20170822140255.t2wfwkjr67v3eoxu@sirena.org.uk> From: Donglin Peng Date: Tue, 22 Aug 2017 22:15:32 +0800 Message-ID: Subject: Re: [PATCH v5 2/9] ASoC: soc-core: Allow searching dai driver name in snd_soc_find_dai To: Mark Brown Cc: Jeffy Chen , linux-kernel@vger.kernel.org, dgreid@chromium.org, =?UTF-8?Q?Heiko_St=C3=BCbner?= , briannorris@chromium.org, mengdong.lin@linux.intel.com, mka@chromium.org, lars@metafoo.de, dianders@chromium.org, Jaroslav Kysela , alsa-devel@alsa-project.org, Takashi Iwai , Liam Girdwood Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 526 Lines: 12 On Tue, Aug 22, 2017 at 10:02 PM, Mark Brown wrote: > On Tue, Aug 22, 2017 at 09:24:32PM +0800, Donglin Peng wrote: > >> In case that dai->driver->name is NULL, strcmp(dai->driver->name, >> dlc->dai_name) will cause segmentation fault. >> so I think that we can change it as the follows: > > We should be already verifying that drivers have a name, we assume one > elsewhere. But I can't find any codes that set or check dai_driver->name in function snd_soc_register_codec or snd_soc_register_component.