mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: alexander.levin@verizon.com
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Cc: Guenter Roeck <linux@roeck-us.net>,
	Tony Lindgren <tony@atomide.com>,
	alexander.levin@verizon.com
Subject: [PATCH AUTOSEL for 4.4 07/32] ARM: OMAP2+: Release device node after it is no longer needed.
Date: Wed, 29 Nov 2017 17:21:49 +0000	[thread overview]
Message-ID: <20171129172141.28925-7-alexander.levin@verizon.com> (raw)
In-Reply-To: <20171129172141.28925-1-alexander.levin@verizon.com>

From: Guenter Roeck <linux@roeck-us.net>

[ Upstream commit b92675d998a9fa37fe9e0e35053a95b4a23c158b ]

The device node returned by of_find_node_by_name() needs to be released
after it is no longer needed to avoid a device node leak.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 9ef0bd1676cd..13e22a4a5a20 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -3967,15 +3967,20 @@ int __init omap3xxx_hwmod_init(void)
 
 	if (h_sham && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "sham")) {
 		r = omap_hwmod_register_links(h_sham);
-		if (r < 0)
+		if (r < 0) {
+			of_node_put(bus);
 			return r;
+		}
 	}
 
 	if (h_aes && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "aes")) {
 		r = omap_hwmod_register_links(h_aes);
-		if (r < 0)
+		if (r < 0) {
+			of_node_put(bus);
 			return r;
+		}
 	}
+	of_node_put(bus);
 
 	/*
 	 * Register hwmod links specific to certain ES levels of a
-- 
2.11.0

  parent reply	other threads:[~2017-11-29 17:41 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-29 17:21 [PATCH AUTOSEL for 4.4 01/32] vti6: Don't report path MTU below IPV6_MIN_MTU alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 03/32] x86/hpet: Prevent might sleep splat on resume alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 04/32] selftest/powerpc: Fix false failures for skipped tests alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 02/32] ARM: OMAP2+: gpmc-onenand: propagate error on initialization failure alexander.levin
2017-11-29 17:21 ` alexander.levin [this message]
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 06/32] ARM: OMAP2+: Fix device node reference counts alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 05/32] module: set __jump_table alignment to 8 alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 08/32] gpio: altera: Use handle_level_irq when configured as a level_high alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 11/32] USB: gadgetfs: Fix a potential memory leak in 'dev_config()' alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 12/32] kvm: nVMX: VMCLEAR should not cause the vCPU to shut down alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 10/32] usb: gadget: configs: plug memory leak alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 09/32] HID: chicony: Add support for another ASUS Zen AiO keyboard alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 14/32] workqueue: trigger WARN if queue_delayed_work() is called with NULL @wq alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 15/32] scsi: lpfc: Fix crash during Hardware error recovery on SLI3 adapters alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 16/32] irqchip/crossbar: Fix incorrect type of register size alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 13/32] libata: drop WARN from protocol error in ata_sff_qc_issue() alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 19/32] arm64: KVM: Survive unknown traps from guests alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 18/32] arm: " alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 17/32] KVM: nVMX: reset nested_run_pending if the vCPU is going to be reset alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 20/32] spi_ks8995: fix "BUG: key accdaa28 not in .data!" alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 23/32] bnx2x: do not rollback VF MAC/VLAN filters we did not configure alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 21/32] bnx2x: prevent crash when accessing PTP with interface down alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 22/32] bnx2x: fix possible overrun of VFPF multicast addresses array alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 24/32] ipv6: reorder icmpv6_init() and ip6_mr_init() alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 28/32] netfilter: don't track fragmented packets alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 27/32] zram: set physical queue limits to avoid array out of bounds accesses alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 26/32] i2c: riic: fix restart condition alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 29/32] axonram: Fix gendisk handling alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 25/32] crypto: s5p-sss - Fix completing crypto request in IRQ handler alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 32/32] EDAC, i5000, i5400: Fix use of MTR_DRAM_WIDTH macro alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 31/32] powerpc/powernv/ioda2: Gracefully fail if too many TCE levels requested alexander.levin
2017-11-29 17:21 ` [PATCH AUTOSEL for 4.4 30/32] drm/amd/amdgpu: fix console deadlock if late init failed alexander.levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171129172141.28925-7-alexander.levin@verizon.com \
    --to=alexander.levin@verizon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=stable@vger.kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®