Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp249845pxy; Wed, 21 Apr 2021 01:59:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcG7PjWkkIV2KrBbpthCT4GJJ+ojInx3capLnqjY7dBA8LWBtieulugzF1KuOaQKOiwK7F X-Received: by 2002:a17:902:fe91:b029:eb:ad8:c5f with SMTP id x17-20020a170902fe91b02900eb0ad80c5fmr33233773plm.63.1618995589986; Wed, 21 Apr 2021 01:59:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618995589; cv=none; d=google.com; s=arc-20160816; b=pcYkow687KuBKDRpKJT3nZtji23TGnZcOsT2Uf8uLThEL3bGsEQnDi4TpG9DT+3ZJ8 KHGe+pRUp3OoSW+rOd2wcFaHbw7H1S1oyMJreb6G8BCEZsKqZ7zSA2ZIASSzreaAOkoH uyr4acoE7qSchLlW/4/mcZD5Gvx34bgpKM9TLQItPbnOYqFe3sgh2xZ1dKI1Ea1tfyoZ 42baoYhVae9BCWqJjclLbpyZ5W1QqvOT/6JPs3xkGrfc4Dvhj2E44+erb1UC51uGV2RB F7Tqs9h0IEyygo7VYMEB33DW3zVOW0OkQnL4YEuKgo3jGh5dixr/f/CajRtfg0vw+Ws2 K6Eg== 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=nPczol+VR0KR9nJGshmhZqjVXxehr8YBfTima70vMQ4=; b=xG/KqKIzUw5sbyjIim1jbA4+Pkjf7ykrptfWLbPCuO6i6VolV3eHl/N+bqh2i0cquR IxGKK2tqc9l3gHTqtFJIq1aF5n3qXU2ShSG82GDM+b0LihlQaHzAtBwE+lLv8+LbUqQT koWcaTXDl+gVF6aMzsaY5LCB7LYWexZkri7MjvrqYSmLgMTSG1H77AcR6XuIKANnwKyh nJ+/p5tk4vENng3FtKpdCACHiePgSN0Ao1Z/8SjUjHi3653iJMI6Lf/KQ5e5/57pWJ6D OxkVVnBXAlRV0jmPW6JmnmmwOkzLNK5+iDl6BhbZnZq4PXooi4vouzehjgVakap5LCbS aYag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=FF8yrK+T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p2si2034319pjg.13.2021.04.21.01.59.38; Wed, 21 Apr 2021 01:59:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=FF8yrK+T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235520AbhDUIof (ORCPT + 99 others); Wed, 21 Apr 2021 04:44:35 -0400 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:42190 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235083AbhDUIod (ORCPT ); Wed, 21 Apr 2021 04:44:33 -0400 Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13L8bSlw004719; Wed, 21 Apr 2021 03:43:58 -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=nPczol+VR0KR9nJGshmhZqjVXxehr8YBfTima70vMQ4=; b=FF8yrK+TrvFPsj6oIGfOhVxAy/ZLNwMxTJtIssQ3eWRsxa1yX+ovoZYalxNjZf5ZGQdC j7uVxhm7R0/idzqj0mnAd9BfwWCPnjjBZMi+tujkAdIB26iJSlmAups7gTnOdDFbNR6D pWlv9M6+zhMySn9pQQeiHUMG7uldQlutL4Ji6uB++Nlh3bsazIVjvkxCa4I0o3yo4yDi avuIeBzBub6aBUuhQOUia+q13hHQOZvRZNQJmmwdVWIkTxPgh89xz1giZ7gs2M2SfEks 8e93BRU/aMbd6PCryeMYfh83RgDpDt839Y/HhtvLcfo41UjW3WDPMtaD3bzkfPBsRgKR 0w== Received: from ediex01.ad.cirrus.com ([87.246.76.36]) by mx0b-001ae601.pphosted.com with ESMTP id 381a0rjtcs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 21 Apr 2021 03:43:58 -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.2242.4; Wed, 21 Apr 2021 09:43:57 +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.2242.4 via Frontend Transport; Wed, 21 Apr 2021 09:43:57 +0100 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 292D711D6; Wed, 21 Apr 2021 08:43:57 +0000 (UTC) Date: Wed, 21 Apr 2021 08:43:57 +0000 From: Charles Keepax To: Christophe JAILLET CC: , , , Subject: Re: [PATCH] regulator: Avoid a double 'of_node_get' in 'regulator_of_get_init_node()' Message-ID: <20210421084357.GB64205@ediswmail.ad.cirrus.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-GUID: WmW1AHhvl6ZsxFfNfknH2sKP5mZ1xlsz X-Proofpoint-ORIG-GUID: WmW1AHhvl6ZsxFfNfknH2sKP5mZ1xlsz X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 priorityscore=1501 phishscore=0 mlxlogscore=770 impostorscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 adultscore=0 spamscore=0 clxscore=1011 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104210068 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 20, 2021 at 09:31:51PM +0200, Christophe JAILLET wrote: > 'for_each_available_child_of_node()' already performs an 'of_node_get()' > on child, so there is no need to perform another one before returning. > Otherwise, a double 'get' is performed and a resource may never be > released. > > Fixes: 925c85e21ed8 ("regulator: Factor out location of init data OF node") > Signed-off-by: Christophe JAILLET > --- Acked-by: Charles Keepax Thanks, Charles