From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37254C433F5 for ; Tue, 11 Jan 2022 16:11:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349846AbiAKQLC (ORCPT ); Tue, 11 Jan 2022 11:11:02 -0500 Received: from smtp-out1.suse.de ([195.135.220.28]:59700 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343508AbiAKQLB (ORCPT ); Tue, 11 Jan 2022 11:11:01 -0500 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 4D7B021135; Tue, 11 Jan 2022 16:11:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1641917460; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sc1CBYFF5ymyW+1HvB5nHhEJzHMwZx8HHI5lpt+9E7g=; b=gw//o/SEbQ5lH7CGHX2p+7nOep+l/uxv2g40y/F68M9U+CPc3GzDzmhWNti91BtFmvrQrw EOH9PAfkdwjpoMylAUgPP0DzkNFUCssc8qcykV9sUOrtaWqDtYgN1Nh5MwZTnvP+thS56S iN1Cau4rfcAPOk0zUKaZ+JunUU4IHGE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1641917460; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sc1CBYFF5ymyW+1HvB5nHhEJzHMwZx8HHI5lpt+9E7g=; b=F+bpKfSDND4/zG+ELos1B9ivmFs3AIAmqjoC0/Cc5Y16b5wRXMin1MuFTpbFSBPmnMGPZn AuaFa7YekP0+3rBQ== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 36DC3A3B90; Tue, 11 Jan 2022 16:11:00 +0000 (UTC) Date: Tue, 11 Jan 2022 17:11:00 +0100 Message-ID: From: Takashi Iwai To: Tom Rix Cc: Andy Shevchenko , "james.schulman@cirrus.com" , "david.rhodes@cirrus.com" , "tanureal@opensource.cirrus.com" , "perex@perex.cz" , "tiwai@suse.com" , "nathan@kernel.org" , "ndesaulniers@google.com" , "alsa-devel@alsa-project.org" , "patches@opensource.cirrus.com" , "linux-kernel@vger.kernel.org" , "llvm@lists.linux.dev" Subject: Re: [PATCH] ALSA: hda: cs35l41: fix double free in cs35l41_hda_probe() In-Reply-To: References: <20220108140756.3985487-1-trix@redhat.com> <0c0926d9-9b72-1519-7e22-e90ffc229940@redhat.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 10 Jan 2022 11:21:11 +0100, Andy Shevchenko wrote: > > On Mon, Jan 10, 2022 at 2:37 AM Tom Rix wrote: > > On 1/9/22 2:33 PM, Andy Shevchenko wrote: > > On Saturday, January 8, 2022, wrote: > > ... > > >> + if (unlikely(ret)) { > > > > This is double weird. First of all, wtf unlikely is here? Second, I commented on the patch that does something with this driver and pointed out to the return 0 in some cases. This one seems a band aid. > > > > Unlikely to have an error. > > We don't use likely() and unlikely() here and there, you need to > provide a very good justification of its use. > > For the record, I forwarded you my review against the code where you > can find much more issues with it that are subject to fix / amend. For this particular bug fix, Dan submitted a simpler patch and I took it now: https://lore.kernel.org/r/20220111072232.GG11243@kili thanks, Takashi