From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Keepax Subject: Re: [PATCH 13/31] ASoC: wm_adsp: Fix BUG_ON() and WARN_ON() usages Date: Thu, 7 Nov 2013 10:19:39 +0000 Message-ID: <20131107101939.GJ30879@opensource.wolfsonmicro.com> References: <1383673218-18405-1-git-send-email-tiwai@suse.de> <1383673218-18405-14-git-send-email-tiwai@suse.de> <20131106184422.GI30879@opensource.wolfsonmicro.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from opensource.wolfsonmicro.com (opensource.wolfsonmicro.com [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id 8097C2654EF for ; Thu, 7 Nov 2013 11:19:40 +0100 (CET) Content-Disposition: inline In-Reply-To: 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: Takashi Iwai Cc: alsa-devel@alsa-project.org, Mark Brown , patches@opensource.wolfsonmicro.com, Liam Girdwood List-Id: alsa-devel@alsa-project.org On Wed, Nov 06, 2013 at 09:23:42PM +0100, Takashi Iwai wrote: > At Wed, 6 Nov 2013 18:44:22 +0000, > Charles Keepax wrote: > > These do make me a little nervous previously we would panic here, > > so everything would stop but now we may write random registers on > > the CODEC which could cause some odd behaviour. I think it would > > be better to update wm_adsp_region_to_reg to allow a failed > > return code and then error out of wm_adsp_load rather than just > > relying on the WARN_ON inside. > > Yeah, handling the error properly would be definitely better. > Care to enhance the patch? Yeah fair enough, lets merge the patch as is and I will send out a seperate patch once I get a few spare minutes to improve the error handling in this bit of code. Reviewed-by: Charles Keepax Thanks, Charles