Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp328058pxb; Thu, 25 Feb 2021 03:47:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwz4RwJ4WeLblc3BW1hzSC8m2NV4cURbXK53D/xmdVXtF/lpkxUKo1bsaKd7TXvBYAU60Bj X-Received: by 2002:aa7:c243:: with SMTP id y3mr2454455edo.122.1614253671061; Thu, 25 Feb 2021 03:47:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614253671; cv=none; d=google.com; s=arc-20160816; b=YxNTGF/9T3ZEw2ZW+Y2hY9u0UHzd6bKv5lWLZ1Y6Wp928Vx9Z653ytasItz5cW5jmP I/zfTTin3xG0xipguQ8GwbWb9KlNI6hTak8NCZ4nbxBkQ4VoY1kKoBY5K2Lcr0ziza3U d1IrLdjmy/35f5/k6VqURZGJEaKxvpwzSJxvM8Ksps9G1DPiKXn6ejYn2mefFGCZbv5Z 1AOsgzPq8jMCE4lzlVYAIjvR82tqtKdpDf/OlSu4w1zOAI6LeDWgrHwxlmdwRH9lDpZJ 4o/f07u2SJE5hLTTDfvpOD5vHGIGHK6LflWOw/qzgpUoJGnpg235DoiW/3h8WOnMsIuN k3Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=q5TVma+jtHVZj7/DmGRBH+KghT6SJyZKyiKr1P7qvMU=; b=nrMGY9cZFsnBeRHDChsHLZlwBo9uF6niP65sxsOQQ8U5kwe60nLTgdPstNYeDP81lI jleVdZLNGaYpE/bIx1g2qET0hNghOvct7wSm5yJPvML3IBUu5nWdlM5pkZs8hLYtNvjM WYg3aFE05h0wXaJVrmcsUwzebqDNRqiKXc3wXLPrEAq6ot1IIVBdM1odt3CTnqp43L2s g8C5EknHk7Bwisj4h4PHsjbblcNMM3X4DYQnabsnc0XuIZ7dmUxhbcA7fwNrlJsyqYJz wPStD1wLgDa7CtR5IGM5e0KA5Su1zB0Z99LzWV0kkr9mf8xeTt/3TJhUevzUSmED1Mc0 WLPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=l8g3SqNm; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h24si3010701edv.333.2021.02.25.03.47.20; Thu, 25 Feb 2021 03:47:51 -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; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=l8g3SqNm; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233571AbhBYLQg (ORCPT + 99 others); Thu, 25 Feb 2021 06:16:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233660AbhBYLQf (ORCPT ); Thu, 25 Feb 2021 06:16:35 -0500 Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A96ADC061574; Thu, 25 Feb 2021 03:15:54 -0800 (PST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4DmVZr71ldz9sBy; Thu, 25 Feb 2021 22:15:48 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1614251751; bh=Vca/imfcO2yn/YdTghwR8DqtTxd3FAFwqDWZTbVefq4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=l8g3SqNmOf5alYyLAsWGsuOdqzrJtVJj4EJ6aKNBYE4wELIlH1+ejvW9kSQyaxuqX /JME0W7NjR4gvc5TZ8X+Pmu0aJ3RI+WvleS4b40NwCo+3OBwh5EpP+pJ8q2+LggIjZ V8ycZ2v23ZkcE6LEQpJT0knqp9OG2YMPwaSlBmpvzYPx1bo8OEOg8b1YlzvDkfQC8q PdeABa2WJRDW12/Mq3gQmB1vjzY6/bkq1y20EOd/X+Kl45PjgOIu+rmLa16Lxqcwnz Si9rFvNiSTJgGxcYsbALHAvSuneDoY2ed/VXVLP2kx0c/+cUvN1uhLfYD4+JrHdumW QZgzAwZOuMSGw== From: Michael Ellerman To: Yang Li , herbert@gondor.apana.org.au Cc: 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: Re: [PATCH] crypto/nx: add missing call to of_node_put() In-Reply-To: <1614243417-48556-1-git-send-email-yang.lee@linux.alibaba.com> References: <1614243417-48556-1-git-send-email-yang.lee@linux.alibaba.com> Date: Thu, 25 Feb 2021 22:15:45 +1100 Message-ID: <87v9ags8im.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Yang Li writes: > 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; Sorry this is wrong, the if needs braces. cheers