From patchwork Thu Feb 25 08:56:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 387328 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 905E5C433E0 for ; Thu, 25 Feb 2021 08:58:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 367EE64F06 for ; Thu, 25 Feb 2021 08:58:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229644AbhBYI5u (ORCPT ); Thu, 25 Feb 2021 03:57:50 -0500 Received: from out30-44.freemail.mail.aliyun.com ([115.124.30.44]:34840 "EHLO out30-44.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234102AbhBYI5p (ORCPT ); Thu, 25 Feb 2021 03:57:45 -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=9; SR=0; TI=SMTPD_---0UPX1XpO_1614243418; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UPX1XpO_1614243418) by smtp.aliyun-inc.com(127.0.0.1); Thu, 25 Feb 2021 16:56:59 +0800 From: Yang Li To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, mpe@ellerman.id.au, 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] crypto/nx: add missing call to of_node_put() Date: Thu, 25 Feb 2021 16:56:57 +0800 Message-Id: <1614243417-48556-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 --- drivers/crypto/nx/nx-common-powernv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/nx/nx-common-powernv.c b/drivers/crypto/nx/nx-common-powernv.c index 13c65de..b43c457 100644 --- a/drivers/crypto/nx/nx-common-powernv.c +++ b/drivers/crypto/nx/nx-common-powernv.c @@ -933,6 +933,7 @@ static int __init nx_powernv_probe_vas(struct device_node *pn) NX_CT_GZIP, "ibm,p9-nx-gzip", &ct_gzip); if (ret) + of_node_put(dn); return ret; }