Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1581754pxb; Mon, 8 Mar 2021 00:47:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwn5GxM52xRVfrMeIoKLRmpvh8U0YNAq5hDfddSERsc8DCyEFE7Lgpc40/TZ3s4dLmjWGYk X-Received: by 2002:a17:906:8593:: with SMTP id v19mr14027364ejx.32.1615193222473; Mon, 08 Mar 2021 00:47:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615193222; cv=none; d=google.com; s=arc-20160816; b=gSRrir0wp5A116iNroKznurjB8+uzYciFSBnvPkt1WKPjbfjjIYkXhd0/cuLPzLQ2F QJWudabGR097tUsR9v8PudAVQYbVIROw90MUcPMTrxbHT1Zi38ynuy48EU5YSAJQprUq n+IOODLfYOZsEDduQFfImxYDXlzrZjBSnAckDzvrdZqN4L6q6Tv94QT+A8rmncn55tQk 0sJPJZzvfi1QKS055yvsChu+1SXVqeL3rDLsw1pTJmRD9tvDMMmzbNvZOkETAXi9S6w4 TSD623r57uHDDhuSn+M6Z+0MwfVWOIMb1280Hb8GXxpf/nbKiN3IweZKV65mtsmG15lC XUzw== 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=cyzCVfv9/yEVhV2cISExRjTStg7lzQwC7F1FA518kso=; b=EwSEei6iXKaWFVhCta9/JLQVY5U6HU7cSq0duAjijH5suB2fxGnnua1OpKwb/sAfQk WkMNXTTkOlvTE/nEEGdnOd9SYFrYl1hDlG5xAtLR48mDcnsULjH/FALLTXsJrm6ibVx5 45kjIMvJROVwVt18XssTNLRu4wog0FAr1Izf6UH0aOjL22F3me/4TfaC4N6a7WCXiBAu hMvAb6YLumWbO+WpIlfqWE+tBzchz92WBVAh1I7ztCJ8vGAOLP+K+Y11Bu7xYV6raXKI Saaad8pR2LPsXZKC0i0+AfHmGN8h/8BKlvX6O/e0jLuVVpHhyTbfXpOGFXFv7/ZmtU9v D3Lg== 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 k5si6394418ejj.483.2021.03.08.00.46.40; Mon, 08 Mar 2021 00:47:02 -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 S235135AbhCHHKc (ORCPT + 99 others); Mon, 8 Mar 2021 02:10:32 -0500 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:42986 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235143AbhCHHKJ (ORCPT ); Mon, 8 Mar 2021 02:10:09 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R341e4;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=4;SR=0;TI=SMTPD_---0UQqOqPM_1615187407; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UQqOqPM_1615187407) by smtp.aliyun-inc.com(127.0.0.1); Mon, 08 Mar 2021 15:10:07 +0800 From: Yang Li To: kishon@ti.com Cc: vkoul@kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH] phy: hisilicon: add missing call to of_node_put() Date: Mon, 8 Mar 2021 15:10:05 +0800 Message-Id: <1615187405-28337-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/phy/hisilicon/phy-hisi-inno-usb2.c:138:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before break around line 158. Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/phy/hisilicon/phy-hisi-inno-usb2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/phy/hisilicon/phy-hisi-inno-usb2.c b/drivers/phy/hisilicon/phy-hisi-inno-usb2.c index 34a6a9a..c58115e 100644 --- a/drivers/phy/hisilicon/phy-hisi-inno-usb2.c +++ b/drivers/phy/hisilicon/phy-hisi-inno-usb2.c @@ -146,8 +146,10 @@ static int hisi_inno_phy_probe(struct platform_device *pdev) priv->ports[i].priv = priv; phy = devm_phy_create(dev, child, &hisi_inno_phy_ops); - if (IS_ERR(phy)) + if (IS_ERR(phy)) { + of_node_put(child); return PTR_ERR(phy); + } phy_set_bus_width(phy, 8); phy_set_drvdata(phy, &priv->ports[i]); -- 1.8.3.1