Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp848570pxb; Thu, 25 Feb 2021 17:25:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJw722F4qDkb4DgnGXMqh/iy0KA2K2CiELevs/mHUV7Th8la4KxdsRjkF4NabKKaaS0mldxW X-Received: by 2002:a17:907:ea3:: with SMTP id ho35mr534106ejc.396.1614302723566; Thu, 25 Feb 2021 17:25:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614302723; cv=none; d=google.com; s=arc-20160816; b=MYQ0/LfA6DA57j+9L4rQGMKt6ca1Eo72iHLr7qlWk+a9dJLl2/4ihnyR/MXQz14+W4 3sj763TV62rHx7G1VI6YwtvRmewA3YWZaDqrzmsBsEAhmW+axtID7A7QX+BXaVHk9F9w UovhjBPv+77AwiuChUhRNppNgekdYcPdCXrLqBjRsDFheyd+tyFdC+54Z4s+munS73d6 qEhPSp+fRYVIXa8plXpcHzoWpIBjPZasEEcotI02aTPQa162DshWTUsfycVnZkoscVJU TRbpCfTnp41O3PqgKg2r76EvZJ+1DSUgei/HxohYs76k/EbYS/eupgvRC2+lvcZp7SEw qq+w== 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=Zev3wxSfs3u1aTTVYT9G4vPTcek6uP4JK6F6Oi4fhbs=; b=VmvVHIvG/WfLdcpRSdqhlXpXns3/h8peyRDfc1VTfXM3epSSuONy1tRedwsvH5Zw5W Oh6o6Prjep3MqyB72lPZATpGweSPgOKRReqIie9j6KvMt+EKcRJ53nAt3ZhvRP1ftbGt ZqsIXou86nKvmR8KF1VQXyIS6xR+7tCgyl3tQB5uMouSPNltZ7TlBO1hA6awLIY7l0BF dwNR8SU+YhNH63Sutq4GSMy1YJ82LHTzDUjMhm8Hsu9ku2thP7Hl7mBl5tWf4lG10sEN SYkLDiaPrRn9EzowVgmU7fuZBR7ah0Vs0mCiFDfL33inpS+/opTY6pvQl3ixGvX0ujyo Vu+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-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 gb39si4777779ejc.370.2021.02.25.17.24.48; Thu, 25 Feb 2021 17:25:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-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 S230071AbhBZBYH (ORCPT + 99 others); Thu, 25 Feb 2021 20:24:07 -0500 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:46344 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230014AbhBZBXw (ORCPT ); Thu, 25 Feb 2021 20:23:52 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0UPaRmgn_1614302587; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UPaRmgn_1614302587) by smtp.aliyun-inc.com(127.0.0.1); Fri, 26 Feb 2021 09:23:08 +0800 From: Yang Li To: mpe@ellerman.id.au Cc: herbert@gondor.apana.org.au, davem@davemloft.net, benh@kernel.crashing.org, paulus@samba.org, linux-crypto@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH v2] crypto/nx: add missing call to of_node_put() Date: Fri, 26 Feb 2021 09:23:06 +0800 Message-Id: <1614302586-15095-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-crypto@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/crypto/nx/nx-common-powernv.c:927:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 936. Reported-by: Abaci Robot Signed-off-by: Yang Li --- Changes in v2: -add braces for if drivers/crypto/nx/nx-common-powernv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/nx/nx-common-powernv.c b/drivers/crypto/nx/nx-common-powernv.c index 13c65de..446f611 100644 --- a/drivers/crypto/nx/nx-common-powernv.c +++ b/drivers/crypto/nx/nx-common-powernv.c @@ -932,8 +932,10 @@ static int __init nx_powernv_probe_vas(struct device_node *pn) ret = find_nx_device_tree(dn, chip_id, vasid, NX_CT_GZIP, "ibm,p9-nx-gzip", &ct_gzip); - if (ret) + if (ret) { + of_node_put(dn); return ret; + } } if (!ct_842 || !ct_gzip) { -- 1.8.3.1