Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3323320pxb; Mon, 18 Oct 2021 12:46:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3C9sPJdLBxltSwvUnG4ngaU7pWD7QolKm5LCzMEMgzWltcE7Ecfz3kNT7fhR3JtgE2Mci X-Received: by 2002:a62:7656:0:b0:44c:591b:5a42 with SMTP id r83-20020a627656000000b0044c591b5a42mr30918424pfc.57.1634586368541; Mon, 18 Oct 2021 12:46:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634586368; cv=none; d=google.com; s=arc-20160816; b=MFXwi4DTEvuRXAZIsDxGaTqSxe6wUW1PoJ7Qi1n7uYAgQd1qzErlmdGyQ5JAPw5YoJ WkBTgZOKjKlpv867yJFG9ZDGQe4XQkeRWkhHmV8HL2tgdUzcN49tIRvBFBS5gKAU3Hnp Oiu+PebvSH9qKOQhy8r8P9/9ryxPXk8g5Wgg05NL+ubPp2GiojO9BlgN0L4ZOoYpP2CF cEUZcgO99UAjhsapxu7znK0ztAZHvjXnwsRETSMogW+Q14F7s/eitoTGJ6NWS6F7bMXL AV3tdRdqO/CsMp7GWtNwrALuEb9gD5aMHs+I0olw6PiR0xevJqojlq6r40JpX5rIK26f hGog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=oK040T6QEDAHO34HVHYkL9j5Q7q7KbqrF5xE1AuzjI8=; b=WVoEtVSN/2oLypLlIX/dZON9bBy4fs89S7oCgPOuR32VGGKUL25qv3borVcG27afqv tQiGM7VMYNLFJA1kLSvxfENZlj9RpDac4YiF2GYcwNibF7LsDH2z+H+byYJdb9NCCpAY 0wcQmn1/k7ojsKQpYZr3ND14z9ZutUBTJSOs6IvXvns/BBzwzhcNm5WM/J0dKSdiB2oD FpK4jaWD+tgfl+w9YKIUXaKWroZVj0Mupoo4XZmnGOhAuocXWeT1IFXclbUncUqFzqgm KdnF7n4PWWA6ayGrBVSjArdZ3IQgu4o9U668EhUWZkG7XUSVqtXuIHZzCxWi7+ysKj1A zMHg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q8si23296394pfu.132.2021.10.18.12.45.54; Mon, 18 Oct 2021 12:46:08 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232164AbhJRTqg (ORCPT + 99 others); Mon, 18 Oct 2021 15:46:36 -0400 Received: from smtp01.smtpout.orange.fr ([80.12.242.123]:63603 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231811AbhJRTqg (ORCPT ); Mon, 18 Oct 2021 15:46:36 -0400 Received: from pop-os.home ([92.140.161.106]) by smtp.orange.fr with ESMTPA id cYYUmZVOg1UGBcYYUmpEyj; Mon, 18 Oct 2021 21:44:22 +0200 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Mon, 18 Oct 2021 21:44:22 +0200 X-ME-IP: 92.140.161.106 From: Christophe JAILLET To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, kuninori.morimoto.gx@renesas.com, mikhail_durnev@mentor.com, joe@perches.com, pierre-louis.bossart@linux.intel.com Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] ASoC: rsnd: Fix an error handling path in 'rsnd_node_count()' Date: Mon, 18 Oct 2021 21:44:16 +0200 Message-Id: <4c0e893cbfa21dc76c1ede0b6f4f8cff42209299.1634586167.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If we return before the end of the 'for_each_child_of_node()' iterator, the reference taken on 'np' must be released. Add the missing 'of_node_put()' call. Fixes: c413983eb66a ("ASoC: rsnd: adjust disabled module") Signed-off-by: Christophe JAILLET --- sound/soc/sh/rcar/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 978bd0406729..6a8fe0da7670 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -1225,6 +1225,7 @@ int rsnd_node_count(struct rsnd_priv *priv, struct device_node *node, char *name if (i < 0) { dev_err(dev, "strange node numbering (%s)", of_node_full_name(node)); + of_node_put(np); return 0; } i++; -- 2.30.2