Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp11290rwb; Tue, 15 Nov 2022 18:11:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf6UnTpUvAlaJijMVqn/jJs6Cl1XlVrndseXcp7VPgdS2bIvxVuvcRpnWewC+VKsd3rLf98B X-Received: by 2002:a17:90b:30c5:b0:216:bd62:e68c with SMTP id hi5-20020a17090b30c500b00216bd62e68cmr1297503pjb.215.1668564672944; Tue, 15 Nov 2022 18:11:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668564672; cv=none; d=google.com; s=arc-20160816; b=PH7fkmKrD24EOlYftFAicuSdnnQHCnJ5jLCdnaZLr1w8XhwnuV7PSVE7hm5FJ4DTRQ WeJiJzS3tydZtT+cAeXHzN5H2Kl8B8DtWdx7ypkkR+9GFd3Rnk3laCOvl+Lt1RvzttEP bDT+H+NMkJl/Eu6SZIt1ZJE7MO5CnutS6xk98/Bs6ALhA9Jc6+r75or7DNgPXxtfA6bt vgdHK0JQ2NSMGmpCe/B7XcZgnNBrcJQYHnFpeye0gdMfAxiWykiirwRv24COG0Gqpvis ET2n+DFq/cjXDJ+eRWiNpv+mdlDjVp34o4HLCCIh2KPyPHshavVYd3jYiLMT3p6S/FCO k5Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gDPOfgCfsDpi156C3e6FefCsf6pqUQQ8FpNTQBrsuqU=; b=OhJ2uNFxgw8wWkAaKM/0Id1bKpElWNFl2TNW2oaYMLxZzJWxY0tiXY+8I+sTwuzEDa N/j5ytXzWAsV7TqJzTTiqL/JbZ0OXE6flpPPeHcAvW3vgdfg1rB2SkFPP//PRXycrZ00 8ZysIu74vR6jgb3itK3nI/kwtegHXNP9w5cn8Fqqf+NJjGb9slLTcsoz/n0KUUzM7FbW O8uw4FTUXJHrCGmiuVrynUjfrshIKE7Rj5KoaCP9Eb1uc4FNaz/V7HLMb66uhzN25XHv Fr4QDIewg2UrsZdOesB8CT6KWkSEWGZBSZVpWsUR+b4iHTvRZ+TYkAk0REXel5AUkihh Izbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=1pWmLNiV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m6-20020a654c86000000b0046f5de230desi13159829pgt.418.2022.11.15.18.10.59; Tue, 15 Nov 2022 18:11:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=1pWmLNiV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230076AbiKPB7A (ORCPT + 90 others); Tue, 15 Nov 2022 20:59:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbiKPB66 (ORCPT ); Tue, 15 Nov 2022 20:58:58 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 762B211821; Tue, 15 Nov 2022 17:58:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=gDPOfgCfsDpi156C3e6FefCsf6pqUQQ8FpNTQBrsuqU=; b=1pWmLNiV2HEPMd/seMrvyU9Oyy rX/HE2DM+RqCT73cBUybTRcZnPaHO4j1QXB1yPd+IPFy7/fW5Qv3aStSr6ugUTqSIqSC5ZES42jNw ynjhN/u4twv7TpTZzjyPC2EhzLfcC9DUTdRTaG0shKEp0xqbhDxjmJulcHThQpcsSPWE=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1ov7gw-002WDH-FG; Wed, 16 Nov 2022 02:58:18 +0100 Date: Wed, 16 Nov 2022 02:58:18 +0100 From: Andrew Lunn To: Corentin Labbe Cc: broonie@kernel.org, calvin.johnson@oss.nxp.com, davem@davemloft.net, edumazet@google.com, hkallweit1@gmail.com, jernej.skrabec@gmail.com, krzysztof.kozlowski+dt@linaro.org, kuba@kernel.org, lgirdwood@gmail.com, linux@armlinux.org.uk, pabeni@redhat.com, robh+dt@kernel.org, samuel@sholland.org, wens@csie.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, netdev@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH v4 2/3] phy: handle optional regulator for PHY Message-ID: References: <20221115073603.3425396-1-clabbe@baylibre.com> <20221115073603.3425396-3-clabbe@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221115073603.3425396-3-clabbe@baylibre.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 > + reg_cnt = of_regulator_bulk_get_all(&bus->dev, nchild, &consumers); This allocates memory for consumers? I don't see it being freed. I think you need to add to phy_remove. Plus the error patch should also free it. Andrew