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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DDEAC433EA for ; Sun, 21 Mar 2021 08:35:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DC6476193E for ; Sun, 21 Mar 2021 08:35:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229912AbhCUIQt (ORCPT ); Sun, 21 Mar 2021 04:16:49 -0400 Received: from mx2.suse.de ([195.135.220.15]:40840 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229821AbhCUIQQ (ORCPT ); Sun, 21 Mar 2021 04:16:16 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id D9177AD38; Sun, 21 Mar 2021 08:16:14 +0000 (UTC) Date: Sun, 21 Mar 2021 09:16:14 +0100 Message-ID: From: Takashi Iwai To: Tong Zhang Cc: Jaroslav Kysela , Takashi Iwai , Romain Perier , Allen Pais , Leon Romanovsky , Jasmin Fazlic , Mark Brown , Joe Perches , Tom Rix , Pierre-Louis Bossart , "Gustavo A. R. Silva" , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/3] ALSA: hdsp and hdspm, don't disable device if not enabled In-Reply-To: <20210320222337.243368-1-ztong0001@gmail.com> References: <20210320222337.243368-1-ztong0001@gmail.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 Sat, 20 Mar 2021 23:23:33 +0100, Tong Zhang wrote: > > This series fixes issues in hdsp and hdspm. The drivers in question want > to disable a device that is not enabled on error path. > > v2: add fix to rme9652 > > Tong Zhang (3): > ALSA: hdsp: don't disable if not enabled > ALSA: hdspm: don't disable if not enabled > ALSA: rme9652: don't disable if not enabled Thanks for the patches. IMO, a safer way for this is to add pci_is_enabled() check in *_free() functions around the call of pci_disable_device(). The point is that *_free() is the sole destructor function that manages all stuff, hence it's better to do all there. And, of course, it'll be less changes. Care to resend v3 patches with that? thanks, Takashi