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 66045C54EE9 for ; Tue, 6 Sep 2022 12:01:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234119AbiIFMBm (ORCPT ); Tue, 6 Sep 2022 08:01:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234355AbiIFMBd (ORCPT ); Tue, 6 Sep 2022 08:01:33 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDFD2785A2 for ; Tue, 6 Sep 2022 05:01:29 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 681171F9DD; Tue, 6 Sep 2022 12:01:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1662465688; 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=VYd9KqtaGym9N3B6x/APXqGLrtikSgVt1GlBl0IGkU4=; b=DZ2b6xOZZtc4ZDcz/zCUSoe+wKo85hlzdMySiorZVds83DEyIn78jjZuhybxTgHfELxOZ5 d/DJPKSpYIVJaa7uPV5z+nFuRndO4K7D2Ew3qtd5IplVUHB2TIUrAYbIRwhRPgP+aosCfz Cjho+/vHn95mpkQVjl5LngRUf4Wh6nc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1662465688; 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=VYd9KqtaGym9N3B6x/APXqGLrtikSgVt1GlBl0IGkU4=; b=pRLA/3gHiN0EMikTKvqnBghBMpKB3/9Ilfax9dnMyTmxA/xZWzA7TZ/L6eEWF3QCe1lQXD QNlGwht7qrYJVVAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3981D13A7A; Tue, 6 Sep 2022 12:01:28 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8pBBDZg2F2NnNgAAMHmgww (envelope-from ); Tue, 06 Sep 2022 12:01:28 +0000 Date: Tue, 06 Sep 2022 14:01:27 +0200 Message-ID: <875yi0hfu0.wl-tiwai@suse.de> From: Takashi Iwai To: Andy Shevchenko Cc: Lucas Tanure , alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, James Schulman , David Rhodes , Richard Fitzgerald , Jaroslav Kysela , Takashi Iwai Subject: Re: [PATCH v1 1/2] ALSA: hda: cs35l41: Call put_device() in the scope of get_device() In-Reply-To: <20220905165826.35979-1-andriy.shevchenko@linux.intel.com> References: <20220905165826.35979-1-andriy.shevchenko@linux.intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 05 Sep 2022 18:58:25 +0200, Andy Shevchenko wrote: > > When put_device() is called in another function it's hard to realize > that and easy to "fix" the code in a wrong way. Instead, move > put_device() to be in the same scope as get_device(), so we prevent > appearance of any attempts to "fix" the code. > > Signed-off-by: Andy Shevchenko Applied both patches now. Thanks. Takashi