Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp271880pxb; Thu, 25 Feb 2021 01:59:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJyKPwBVlgf/iSRS8pte4TApSK/4MIWVnlml7EzSLrr/Ch+NmnHVwLCQrIuD8708RtGKC5Vr X-Received: by 2002:aa7:db88:: with SMTP id u8mr1989300edt.329.1614247177446; Thu, 25 Feb 2021 01:59:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614247177; cv=none; d=google.com; s=arc-20160816; b=bOFIW4qF1i9ZtWxF9GPir1asnm6EpMvS/0A2O/A2z4ajaXiICuTvtcfIhMu+lkLli3 ZGpNaIZhF5hJNGINpnuJ8WIssJvphdIxpHNQ5mv86yKreTVs/zHK6TmU+SHkafwcXxcs Jo5JZyt3kw52g5pv9bnFz8132wrDhTsU1iewlEklYVmNU18luaFtNk99x1KlV3Re1I1Z y/OD6CrO1/Orr0ZN8ndX3A3Tb0Roy28Krj4SqzQPBtOAsDApmfqoCM2+BsEHbHv6GNtK 6/saW8y9lZ7z2bw8GfmCB/kUY7QnHUa1mUIYhKZKI7OQ6p0RIXHLCDV+2V2NfoF8FFcq cnQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=2tkR3e9swwxLQ5tpKWnZ/xDAb5hvk3NNZhUtKxZb2q4=; b=CAqq5scE3TpC6YkdV/w4pj9TdhHAvtbXOHRkvA+k3iWqFfs1HWhS/iRbtYChX41GYF Cn/gg6NryLlvzy555wCDVDtdZC9+eziNV9ni2uCklppVGKDN6i1FEF871bVewQuFVgSL 3dJ3TN1WLWHeyKpqSwWsDeJeLA0rTd/+wQuCHU3mzBakGIAGgkbV2Ud/ge/5AgoAhKQm EGK3bFmnDfPGNe6cyBzq9sirJUgUmVfHi0dVOLgknWGwhWuzm9zjrxstALkHjvXDkrhH Sgy90WPaJvEyWTpHiEmT28IO6JX8Hn/THeiee4oa/DNVyYLLvMElim57iA+R1zf5qPFP 2kgw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f11si2994899ejh.500.2021.02.25.01.59.15; Thu, 25 Feb 2021 01:59:37 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234490AbhBYJLd (ORCPT + 99 others); Thu, 25 Feb 2021 04:11:33 -0500 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:48436 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235816AbhBYJIK (ORCPT ); Thu, 25 Feb 2021 04:08:10 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0UPXQxjx_1614244047; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UPXQxjx_1614244047) by smtp.aliyun-inc.com(127.0.0.1); Thu, 25 Feb 2021 17:07:28 +0800 From: Yang Li To: sudeep.holla@arm.com Cc: cristian.marussi@arm.com, lgirdwood@gmail.com, broonie@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH] regulator: add missing call to of_node_put() Date: Thu, 25 Feb 2021 17:07:26 +0800 Message-Id: <1614244046-57560-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In one of the error paths of the for_each_child_of_node() loop, add missing call to of_node_put(). Fix the following coccicheck warning: ./drivers/regulator/scmi-regulator.c:343:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 347. Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/regulator/scmi-regulator.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/scmi-regulator.c b/drivers/regulator/scmi-regulator.c index 0e8b3ca..a41bb06 100644 --- a/drivers/regulator/scmi-regulator.c +++ b/drivers/regulator/scmi-regulator.c @@ -344,6 +344,7 @@ static int scmi_regulator_probe(struct scmi_device *sdev) ret = process_scmi_regulator_of_node(sdev, child, rinfo); /* abort on any mem issue */ if (ret == -ENOMEM) + of_node_put(child); return ret; } -- 1.8.3.1