Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp854123pxb; Thu, 25 Feb 2021 17:36:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwU6DuHz9UwkjX+6V7YTLKxFCHsVRqBvBdha+17V0L2haGFhGkw+rRTCeSCPTJQ4eGWwsgv X-Received: by 2002:a05:6402:1754:: with SMTP id v20mr749242edx.191.1614303400968; Thu, 25 Feb 2021 17:36:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614303400; cv=none; d=google.com; s=arc-20160816; b=dWCt5qhR+ymLulhFh7mRGXxGOyPaofe3eGy39bfMgg7BHY1wYGabhBxrXgVZYwUVv3 aCAWsgTcSpjmqJ3w6E5m4E0Zae0xp5gbQM27CX6xEn8oQBb//MIpqqa2VpainlEaofp0 ohBXOLEs37Rzq4wnUuOZH2C8Lmp3kSpGDDtM34SDPgUQahiAPdOJOGTBKlSdPlEYCPFG SX2VVcg64e+lUusXpxhihS86fC/jRtan7TL7JM+ofkCqk1ro63b1DEMemczAzYcW4SyU R+kNNOw17qUQ2wvYGZ09f3JOfZs56gvXw+tVuHEbbfASRmLY03ODGId3H5O009bP9MbX vddA== 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=roUgn8XKiV6CywWofZdMYG7a8hucEM1iVwh8Le4ecSE=; b=eJNy78Q2xb2iDqjMq9bfPg3hf/57PnfC6Fdp96yOlqj/DsixJjJR1wfUe5+ieVYo3H 5LbOZLbWzU6ros/hVv2DmDynA3kpUy0edZwWrNHDd6Gt3zHJKZrEvL++VyCl+9Sc/ZC4 kXSz5UFXm3wWh6Q/QjklZGgn0zPuNKAqaSh2FuV2cMy+lp94tBDbl8DOZnyAwGlRlGjx Qsyoi94j/cbVLU9q/b6JwhcBmiTtwX4/W867XKvKdX3PqtUe9+l3dIZtog5pY1ey+i3L D6CJRneyvggGx3fvwB+udFUkCglvdGKB/cm+bI28Lr8OBpDz7SpXDP8nU/XFSeNtZnN0 J/zA== 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 w5si5021978edv.513.2021.02.25.17.36.18; Thu, 25 Feb 2021 17:36:40 -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 S229537AbhBZBfn (ORCPT + 99 others); Thu, 25 Feb 2021 20:35:43 -0500 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:42630 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbhBZBfm (ORCPT ); Thu, 25 Feb 2021 20:35:42 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R711e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04395;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0UPaxE1n_1614303299; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UPaxE1n_1614303299) by smtp.aliyun-inc.com(127.0.0.1); Fri, 26 Feb 2021 09:34:59 +0800 From: Yang Li To: paul@crapouillou.net Cc: linus.walleij@linaro.org, linux-mips@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH v2] pinctrl: ingenic: add missing call to of_node_put() Date: Fri, 26 Feb 2021 09:34:57 +0800 Message-Id: <1614303297-24178-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 in ingenic_gpio_probe, add missing call to of_node_put(). Fix the following coccicheck warning: ./drivers/pinctrl/pinctrl-ingenic.c:2485:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 2489. Reported-by: Abaci Robot Signed-off-by: Yang Li --- Changes in v2: -add braces for if drivers/pinctrl/pinctrl-ingenic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-ingenic.c index f274612..c8ecd01 100644 --- a/drivers/pinctrl/pinctrl-ingenic.c +++ b/drivers/pinctrl/pinctrl-ingenic.c @@ -2485,8 +2485,10 @@ static int __init ingenic_pinctrl_probe(struct platform_device *pdev) for_each_child_of_node(dev->of_node, node) { if (of_match_node(ingenic_gpio_of_match, node)) { err = ingenic_gpio_probe(jzpc, node); - if (err) + if (err) { + of_node_put(node); return err; + } } } -- 1.8.3.1