Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1112916pxb; Wed, 6 Apr 2022 09:02:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwX95l38v0o9zw88E9P4TmutVkxHEfkxo45WxU/Nz8kitP78ixUn3IiF5nEhKjUyHStRTh X-Received: by 2002:a05:6808:1385:b0:2f9:409a:4462 with SMTP id c5-20020a056808138500b002f9409a4462mr4038740oiw.30.1649260928229; Wed, 06 Apr 2022 09:02:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649260928; cv=none; d=google.com; s=arc-20160816; b=HJY7QlE9EmlA3EMrMMR//7ieU6MjDhd9rKaHSvkweWK39gj489C35qwe8VdeAduX6s sviZOG/499nNlneur/IOg89Ao3U4srhLg0fkPDmVG1g0X5qw6qG9y8TcrgGEvcLB3fWC WrMZenrgPqGwVLgtsDImyNBOBu5t1ivMtOXr+1hy6+HlpMjfrfJhucXfauIcMP8IJmbF 7qKFM356VE/xDpccHXlrR8pbg37XAl71Bnl87405DyXWOVsS7m/MwWrtdWKmPfxyG3ff kTwno4BsotuWZvBc1EauJRnSI916ZK/4H5UzXGCcnCFqRpPkt0omuQTIXk5V47i2j0s7 djdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=qyk8xTMjH/DJBXZpWSm5gtyrwHKcY5V7aOEPyHINN9g=; b=Y+Uw7XV0dSFkkjJNoOXJWUYC28IFh1oksfAoxJc4e9yxfjx0pE4xu3yGbrInig2A/v hjXBXJkiupYG7XKEW0Sx8Z2C0bTgVRKAN6pvy0GoGWmp1uFLOxuvCvNUh98Xcrl79G93 Y/3dA1cCvSiV4SfbTSkJJFiC2p+KeqkKpAhieX2WGqIAcf+v8wEwXGpqPZ3eMuIGY+bj eYSoVo2fSbutEEWyx8uKCeVb4ohsIuJQkicHLJcyMyaRPGu9zYcCChtpvoWEDXjvSD4T rYE2c9uTvnSk3SKo36yQe6d1nUGYfAJwnrZMdCDo7DiIHd9+lZ/3BznnVeVa/Gj0VKJv 50zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ck3vGGzD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id r21-20020a9d7cd5000000b005cb2fc1383csi9401368otn.184.2022.04.06.09.02.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 09:02:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ck3vGGzD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4F0C33BD25B; Wed, 6 Apr 2022 07:50:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235314AbiDFOv4 (ORCPT + 99 others); Wed, 6 Apr 2022 10:51:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235065AbiDFOva (ORCPT ); Wed, 6 Apr 2022 10:51:30 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69BDE55A9B2 for ; Wed, 6 Apr 2022 04:25:16 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id p8so2185814pfh.8 for ; Wed, 06 Apr 2022 04:25:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qyk8xTMjH/DJBXZpWSm5gtyrwHKcY5V7aOEPyHINN9g=; b=ck3vGGzD0sLUD0SfXv3dreaZ1Ek4bWn8ZNESDidGGpY3eEz6RL5o4wfc4LUNWWmi58 GmfiX58B6ouw4Mb3vM83PjEpxT67WlJ3LYvpRCodMHsLS1kIYRZjz5k+R1HDVSykewob svjCgJF8KLM+YrBmaLHWjjfWspx0wBVyqdyyR+AA2ybE9TfZ3YakwfqNlThu2F4WuXSD EvKmFfHCFxrBHbnL+pgxNcBlbtLTdwTiPVo6eeFJmbGJnGNpY4qQIGUvS7kDwobXQr+Q bYM8ZW7ji5dpc6lpM04+0tKJZqtPcoO6vtNIXGvWhYuCf6BFY3Mk0V8UAAQU7G/1DWfl jIyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qyk8xTMjH/DJBXZpWSm5gtyrwHKcY5V7aOEPyHINN9g=; b=VXu4mj4t+9wM7KdJqWWxWm3/FxM5JXBhS/yu75JcjsLXwavJDLvDnw9zwPT0uW6FOg YKoPl802+3LMz9RO08ipJd5oW0T/ZTU7c/2fjpunzLxPLFTRMe0JqrqFs1qtY84+9a6P I2p5AmwFrLu1a3CLH7WAwDJgxCxF7r5ukofc9FvQgWSDns04qvNyJ6fBPozW6qnBcn02 +PBppPmmSR8UGI4Ln8wL8j9FyOJqsnrPGhNgV8yZyGPOx1L+yyS7k6J1gkXviPPsZBVI sh3ye2ECln1Den34NsbdFaDObf5SeH9eyb9tlLIAKV8H7IZ3QNCVV66zJ/SFRaeKRKqc RNYA== X-Gm-Message-State: AOAM532XLY3TKdWfE3UQNSDnXvb0PfKixlnBK54Ao+aPNeP7OZUksCiG CUgPcyrwy2xwwDJF8JwaPMrztYM/MyYQCWv5Pg== X-Received: by 2002:a63:ce45:0:b0:399:1124:fbfe with SMTP id r5-20020a63ce45000000b003991124fbfemr6795871pgi.542.1649244315566; Wed, 06 Apr 2022 04:25:15 -0700 (PDT) MIME-Version: 1.0 References: <20220405121038.4094051-1-zheyuma97@gmail.com> <20220406100121.GV38351@ediswmail.ad.cirrus.com> In-Reply-To: <20220406100121.GV38351@ediswmail.ad.cirrus.com> From: Zheyu Ma Date: Wed, 6 Apr 2022 19:25:04 +0800 Message-ID: Subject: Re: [PATCH] ASoC: wm8731: Disable the regulator when probing fails To: Charles Keepax Cc: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, patches@opensource.cirrus.com, alsa-devel@alsa-project.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Charles, On Wed, Apr 6, 2022 at 6:01 PM Charles Keepax wrote: > > On Tue, Apr 05, 2022 at 08:10:38PM +0800, Zheyu Ma wrote: > > When the driver fails during probing, the driver should disable the > > regulator, not just handle it in wm8731_hw_init(). > > > > The following log reveals it: > > > > [ 17.812483] WARNING: CPU: 1 PID: 364 at drivers/regulator/core.c:2257 _regulator_put+0x3ec/0x4e0 > > [ 17.815958] RIP: 0010:_regulator_put+0x3ec/0x4e0 > > [ 17.824467] Call Trace: > > [ 17.824774] > > [ 17.825040] regulator_bulk_free+0x82/0xe0 > > [ 17.825514] devres_release_group+0x319/0x3d0 > > [ 17.825882] i2c_device_probe+0x766/0x940 > > [ 17.829198] i2c_register_driver+0xb5/0x130 > > > > Signed-off-by: Zheyu Ma > > --- > > Mark just merged a big chain overhauling a lot of this driver, at > the very least this patch is going to require a rebase on top of > that lot. Thanks for your reminder, this bug has been fixed in the latest code. Regards, Zheyu Ma