Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1121628pxb; Wed, 6 Apr 2022 09:12:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2zh7KHfasST9ysm1WBGasWYJdloZRlKu5msudGZmyESesanytynQNgBm0/TpjUKM8GsOe X-Received: by 2002:a05:6870:d78d:b0:d4:4b29:7ccc with SMTP id bd13-20020a056870d78d00b000d44b297cccmr4229126oab.69.1649261543788; Wed, 06 Apr 2022 09:12:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649261543; cv=none; d=google.com; s=arc-20160816; b=EDeHNcBDvUJc4HVy2Lc0kVZ9sNaPsELz37NhnhEK5lRw4YAK6o5ebDHqFXOClqVi7t 7GbIhaChTmzZQG7nej83/cF0uZmXTfGHWMYxOfGCvfZ8JWMxAFUy70N9E8P8+ursT40R +9hHSp3eLx8ikrTkjLgF+ibrZVRRr0cFEPFba+3jM8XlEMm0OXJ4Z+KfL5neY3i5RGaH lxPo7/zoZzclPcNmxZ2V0mk0Eq6cDccFNhu1tPW419jly/O/lONmULWUjEHgTUSnqH6u Fhd+g3lPaj2RdlQV5RpIomXovkeiOzPXETC/5iOKHzb4DAD0asEB+6d2RiJNrIsUG4Pu H45w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=sPI0KE262NMl5/Dd//VQ2u+CPs7TTFSV0fZrVrMi8pU=; b=ST20BT6YsXkB2dVe/nLyP8IlBAvvua+nYDy7MZrA41yHjKemW2RzMg+G6UQCbACMOy Dcp5NOjGTQISG5m6WsPckvrjTeTTumuHw5SRrI552atnDnvj/m9T4597el7HNweL48n+ cuyLp518e1bKO8sli2zIttvpCo+fEmNq4gPRZwXrAQb+g3ryTIvY4dwy4ajdtAJs9/uT KZgJCcGnwBkaeCOm+A+UDaVlhE4oSPw/xTKlq6t8WOln1niPOBsgJO5h/ajeYZaP3PUV utRyEG9hDKLx1Jh/Ed0122sXSCTPYtbcYR2IVy85ITQWE0ieWGmJa8Kz4UrpnLZTetiV 6evA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=iNLU6lLl; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 26-20020aca0d1a000000b002ef0c34760esi9591626oin.142.2022.04.06.09.12.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 09:12:23 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=iNLU6lLl; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 90BCD45EF90; Wed, 6 Apr 2022 07:34:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234947AbiDFOgh (ORCPT + 99 others); Wed, 6 Apr 2022 10:36:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235196AbiDFOgU (ORCPT ); Wed, 6 Apr 2022 10:36:20 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 123B1412F88 for ; Wed, 6 Apr 2022 04:00:49 -0700 (PDT) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 2369U3LH017684; Wed, 6 Apr 2022 05:01:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=sPI0KE262NMl5/Dd//VQ2u+CPs7TTFSV0fZrVrMi8pU=; b=iNLU6lLlA9LTbz034bLu9e6yO6hks9uAqdmCLlJX/mwQ0QGVovSOjUQd6WgtxyGUAP2f KhCuWjYST7x/EdMjbHQY+H7XS4mMp/x+UUSA6uycll49gM4o1/AZ5BTZRa0/99B93gnV sL3LkzqXpjJ10jG1jJT9IGyNdqivhIA9P+s1i1GqPKdHIZ0TOa2sM0H6SwgRybffJJ0M r6B5dDYW7iBwfHjKNqcvR5L2r2E5S4XVJhwDomzrooW3poVTteiXc5Yf6p0pTejiO6PE eH9waaxewp6EuafkhGkwjn+u9vQ3NVSvteYe0MP7UZ9IT18im9QgZxR5bk4FNd5Iziqu hQ== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3f6jwnvryv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 06 Apr 2022 05:01:23 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 6 Apr 2022 11:01:21 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Wed, 6 Apr 2022 11:01:21 +0100 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id A8E0FB1A; Wed, 6 Apr 2022 10:01:21 +0000 (UTC) Date: Wed, 6 Apr 2022 10:01:21 +0000 From: Charles Keepax To: Zheyu Ma CC: , , , , , , Subject: Re: [PATCH] ASoC: wm8731: Disable the regulator when probing fails Message-ID: <20220406100121.GV38351@ediswmail.ad.cirrus.com> References: <20220405121038.4094051-1-zheyuma97@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20220405121038.4094051-1-zheyuma97@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-ORIG-GUID: S2HnYa2CZmleDIUjLpESqyKuo9NJ9nV_ X-Proofpoint-GUID: S2HnYa2CZmleDIUjLpESqyKuo9NJ9nV_ X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 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, Charles